2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-09-21 16:39:32 +00:00

Enforce the rules the tree is now clean under

Adds the checks whose findings were cleared in the two preceding commits
(F401, F541, E701, E711, E712, E713, PLC0414) plus three that were already
at zero and cost nothing to lock in: E401, B015 and B023.

B905 is deliberately left out even though it also reads as clean: it only
reports on py310+, and satisfying it would mean adding a keyword the oldest
interpreters this tree runs on cannot parse.
This commit is contained in:
Markus Hilger
2026-08-09 14:16:38 +02:00
parent c6c2d3112e
commit d31dba4029
+16
View File
@@ -58,14 +58,30 @@ select = [
# function, break/continue outside a loop, except clause not last
"F81", # redefinition of an unused name (shadowed def/class)
"F82", # undefined name, undefined name in __all__, use before assignment
"F401", # unused import
"F402", # import shadowed by a loop variable
"F541", # f-string with no placeholders
"E401", # several imports on one line
"E701", # several statements on one line
"E711", # comparison to None with == rather than is
"E712", # comparison to True/False with == rather than truthiness
"E713", # `not x in y` rather than `x not in y`
"PLC0414", # import alias that renames nothing
"PLE", # pylint errors: bad string format, invalid returns, ...
"T100", # forgotten pdb/breakpoint call
"W6", # invalid escape sequence in a non-raw string, and any future
# deprecated-construct warning pycodestyle adds
"B015", # comparison whose result is discarded
"B020", # loop control variable overrides the iterable it iterates
"B023", # closure captures a loop variable, so every closure sees the
# last value rather than the one from its iteration
"B035", # dict comprehension with a static key
]
# Deliberately not selected, though currently at zero: B905 (zip without an
# explicit strict=). It only reports on py310+, so it reads as clean here, and
# "fixing" it would mean adding a keyword the oldest supported interpreters
# cannot parse.
# No ignores and no per-file exemptions: every rule selected above is expected
# to stay at zero on its own.