devtools: Replace Ruff with Flake8 in pre-commit.
What changed, and why it matters
This commit simply swaps one Python code-style checker (Ruff) for another (Flake8) in the project's pre-commit configuration. It does not change any application code, network behavior, or security-sensitive logic. There is no security issue here.
No security action needed. Treat as a normal developer-tooling change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch updates .pre-commit-config.yaml to replace the astral-sh/ruff-pre-commit hook (v0.8.0) with pycqa/flake8 (7.3.0). The new Flake8 hook ignores several style/error codes (E501, E731, E741, W503, F541, E275) and keeps the same exclude pattern for generated gRPC files. This is a tooling/linting change only.
Changed components
.pre-commit-config.yamlInspect captured patch +4 / −10
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 2db847f3..e1f4cdcf 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -1,15 +1,9 @@
repos:
-- repo: https://github.com/astral-sh/ruff-pre-commit
- # Ruff version.
- rev: v0.8.0
+- repo: https://github.com/pycqa/flake8
+ rev: 7.3.0
hooks:
- # Run the linter.
- - id: ruff
- args: [ --diff ]
- exclude: "contrib/pyln-grpc-proto/pyln/grpc/(primitives|node)_pb2(|_grpc).py"
- # Run the formatter.
- - id: ruff-format
- args: [ --diff ]
+ - id: flake8
+ args: [ "--ignore=E501,E731,E741,W503,F541,E275" ]
exclude: "contrib/pyln-grpc-proto/pyln/grpc/(primitives|node)_pb2(|_grpc).py"
- repo: https://github.com/shellcheck-py/shellcheck-py
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.