Enable more ruff and pyrefly checks - #272
Merged
Merged
Conversation
Each is the only thing keeping its rule group from being selectable whole. userutil.py imported ctypes with a star; the names it uses are POINTER, byref, c_char_p, c_int, c_int32, c_uint and cdll. The oem lookup loop had an else with no break, so the else always ran. The alert parameter table wrapped int in a lambda that only forwards to it. And the watchdog interval passed 0 where os.environ.get documents a string, which worked because int(0) is 0.
Every rule added here is at zero once the previous commit lands, so it costs no cleanup: the point is that a future patch cannot introduce one without the ruff job failing. They are the rest of pyflakes' format-string checks, flake8-2020, most of bugbear, the pylint warnings that describe bugs rather than style, four flake8-async rules for blocking calls in coroutines, and some RUF, LOG, PGH, PIE, ISC and EXE rules in the same spirit. Each was confirmed to fire on a synthetic violation, so none is silently inert under the py37 target. Rules are named by group wherever the group is already clean, and each prefix stops short of a rule that is not: PLW150 rather than PLW15, which would pull in PLW1510. Bugbear is listed rule by rule apart from B02 and B03, since B006, B007 and B018 are all left out on purpose.
Fifteen error kinds beyond the two async ones report nothing on this tree today and have something in it to bite on, so turning them on costs no findings and keeps it that way. invalid-syntax is the one that closes a gap rather than covering ground another check already holds: CI compiles under a modern interpreter, which accepts syntax the el8 and sles15 interpreters cannot parse. Checking against python-version rejects it instead, which makes that setting load bearing for the first time. Kinds whose subject matter this tree does not contain stay off, among them everything reached only through typing: the module is never imported, so TypeVar and namedtuple naming and stale `# type: ignore` have nothing to find here.
Obihoernchen
force-pushed
the
ruff-more-checks
branch
from
August 11, 2026 03:48
9c71577 to
47cfa70
Compare
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.
Enable additional useful Ruff and Pyrefly checks that already pass or require only minor fixes.