Repository navigation
ci: lint with ruff's pyflakes rules, and fix what they find - #192
Merged
Merged
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
earakely-scale
approved these changes
Oct 14, 2026
This was referenced Oct 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
CI does no static check of the Python code. This change adds
ruff checkwith the pyflakes rules (F) to theunitjob and fixes the 113 findings onmain. Theunitjob is a required check, so the lint gate applies to all pull requests at once.The findings:
TYPE_CHECKING. That resolves the static finding only:typing.get_type_hintsstill cannot resolve aTYPE_CHECKINGname at run time. One test patchedget_configto return an undefinedFakeConfig. The validator does not callget_configon that path, so the patch did nothing. The change removes it.bundle/__init__.pygets__all__for its 14 re-exports, as the other packages have. The two re-exports inenv/gateway/gateway.pyare intentional; they getnoqa: F401.VerifyA2ASystemPromptStepread the registered agent and did not use it; the read is removed. Intest_describe.py, the test name says that the report gives the config file's path, but the test did not check the path. Now it does.import local_stack as local_stack), which marks an intentional re-export. Their oldnoqa: F401goes, and F811 still finds a duplicate test name.ruff==0.16.10is an exact pin in thedevextra, asgriffelibis, because the findings change between releases.make lintruns the same check.This change does not add type checking. On
main,mypyreports 820 errors in 152 files, so type checking needs a separate plan.How it was tested
ruff check: no findings. A duplicate test name added to one of the fixture modules gives F811.make unit-test: 7812 passed, 16 skipped.check_plugin_api.py --base origin/main: no break to the plugin surface.

Confidence Score: 5/5
The PR appears safe to merge; no blocking issues were found.Summary
Adds Ruff’s pyflakes checks to the required
unitjob and providesmake lint.Reviews (3) · Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." · Reviewed by Greptile