diff --git a/ruff.toml b/ruff.toml index 5c19ab7d..bf49679c 100644 --- a/ruff.toml +++ b/ruff.toml @@ -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.