[ci] Scope local pylint pre-commit hook to esphome/ to match CI

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.
This commit is contained in:
J. Nick Koston
2026-04-17 13:41:19 -05:00
parent 70ea527161
commit 291f80263a
+1
View File
@@ -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