chore(core): use `flake8` style check for all PY_FILES
What changed, and why it matters
This is a routine housekeeping change to the project's code-style tooling. It removes a special 'limited' flake8 pass and makes all Python files follow the same style rules. There is no change to the actual wallet firmware or any user-facing behavior.
No security action needed; this is a build/CI linting cleanup.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit deletes the PY_FILES_LIMITED Makefile variable and the tools/style.py.typecheck.exclude file, then updates the pystyle_check and pystyle targets to run a single flake8 invocation over PY_FILES instead of two separate flake8 runs (one with ANN annotations ignored). It also removes the typecheck exclusion list for core/tools/ and tools/. No source code is modified.
Changed components
Makefiletools/style.py.typecheck.excludeInspect captured patch +2 / −9
diff --git a/Makefile b/Makefile
index c1b7cbe5d..bea3e5ec0 100644
--- a/Makefile
+++ b/Makefile
@@ -6,7 +6,6 @@ help: ## show this help
## style commands:
PY_FILES = $(shell find . -type f -name '*.py' | sed 'sO^\./OO' | grep -f ./tools/style.py.include | grep -v -f ./tools/style.py.exclude ) common/protob/pb2py
-PY_FILES_LIMITED = $(shell find . -type f -name '*.py' | sed 'sO^\./OO' | grep -f ./tools/style.py.include | grep -v -f ./tools/style.py.exclude | grep -v -f ./tools/style.py.typecheck.exclude ) common/protob/pb2py
C_FILES = $(shell find . -type f -name '*.[ch]' | grep -f ./tools/style.c.include | grep -v -f ./tools/style.c.exclude )
@@ -23,9 +22,7 @@ pystyle_check: ## run code style check on application sources and tests
@echo [TYPECHECK]
@make -C core typecheck
@echo [FLAKE8]
- @flake8 $(PY_FILES_LIMITED)
- @echo [FLAKE8 - limited]
- @flake8 --extend-ignore=ANN $(PY_FILES)
+ @flake8 $(PY_FILES)
@echo [ISORT]
@isort --check-only $(PY_FILES)
@echo [BLACK]
@@ -48,9 +45,7 @@ pystyle: ## apply code style on application sources and tests
@echo [TYPECHECK]
@make -C core typecheck
@echo [FLAKE8]
- @flake8 $(PY_FILES_LIMITED)
- @echo [FLAKE8 - limited]
- @flake8 --extend-ignore=ANN $(PY_FILES)
+ @flake8 $(PY_FILES)
@echo [PYLINT]
@pylint $(PY_FILES)
@echo [PYTHON]
diff --git a/tools/style.py.typecheck.exclude b/tools/style.py.typecheck.exclude
deleted file mode 100644
index 2924ef603..000000000
--- a/tools/style.py.typecheck.exclude
+++ /dev/null
@@ -1,2 +0,0 @@
-^core/tools/
-^tools/
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.