Ruff
902 rules ruff@0.16.8
Complete effective rule inventory.
Rules
No enabled Ruff rules match this search.
-
B033Sets should not contain duplicate item
{value} -
B034{method}should pass{param_name}andflagsas keyword arguments to avoid confusion due to unintuitive argument positions -
B035Dictionary comprehension uses static key:
{key} -
B039Do not use mutable data structures for
ContextVardefaults -
B043Do not call
delattrwith a constant attribute value. It is not any safer than normal property deletion. -
B901Using
yieldandreturn {value}in a generator function can lead to confusing behavior -
B903Class could be dataclass or namedtuple
-
B904Within an
except*clause, raise exceptions withraise ... from errorraise ... from Noneto distinguish them from errors in exception handling -
B905zip()without an explicitstrict=parameter -
B909Mutation to loop iterable
{name}during iteration -
B911itertools.batched()without an explicitstrictparameter -
B912map()without an explicitstrict=parameter -
BLE001Do not catch blind exception:
{name} -
C400Unnecessary generator (rewrite using
list()) -
C401Unnecessary generator (rewrite using
set()) -
C402Unnecessary generator (rewrite as a dict comprehension)
-
C403Unnecessary list comprehension (rewrite as a set comprehension)
-
C404Unnecessary list comprehension (rewrite as a dict comprehension)
-
C405Unnecessary {kind} literal (rewrite as a set literal)
-
C406Unnecessary {obj_type} literal (rewrite as a dict literal)
-
C408Unnecessary
{kind}()call (rewrite as a literal) -
C409Unnecessary list literal passed to
tuple()(rewrite as a tuple literal) -
C410Unnecessary list literal passed to
list()(remove the outer call tolist()) -
C411Unnecessary
list()call (remove the outer call tolist()) -
C413Unnecessary
{func}()call aroundsorted() -
C414Unnecessary
{inner}()call within{outer}() -
C415Unnecessary subscript reversal of iterable within
{func}() -
C416Unnecessary {kind} comprehension (rewrite using
{kind}()) -
C417Unnecessary
map()usage (rewrite using a {object_type}) -
C418Unnecessary dict {kind} passed to
dict()(remove the outer call todict()) -
C419Unnecessary list comprehension
-
C420Unnecessary dict comprehension for iterable; use
dict.fromkeysinstead -
COM818Trailing comma on bare tuple prohibited
-
COM819Trailing comma prohibited
-
D201No blank lines allowed before function docstring (found {num_lines})
-
D202No blank lines allowed after function docstring (found {num_lines})
-
D2041 blank line required after class docstring
-
D206Docstring should be indented with spaces, not tabs
-
D207Docstring is under-indented
-
D208Docstring is over-indented