From 291f80263ac7cb4c1dacef7e2843486c4483b519 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Fri, 17 Apr 2026 13:41:19 -0500 Subject: [PATCH] [ci] Scope local pylint pre-commit hook to esphome/ to match CI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The ``pylint`` CI job runs ``pylint esphome`` — esphome/ only. The local pre-commit hook had no ``files:`` restriction, so it also linted ``tests/``, flagging pre-existing protected-access usage and class-size issues that CI never sees. That blocked local commits on warnings CI doesn't gate on. Add ``files: ^esphome/.+\\.py$`` to the local pylint hook so its scope matches the CI job exactly. --- .pre-commit-config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e492d35595..d9b7df6ec5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -58,6 +58,7 @@ repos: entry: python3 script/run-in-env.py pylint language: system types: [python] + files: ^esphome/.+\.py$ - id: clang-tidy-hash name: Update clang-tidy hash entry: python script/clang_tidy_hash.py --update-if-changed