Ruff
902 rules ruff@0.16.8
Complete effective rule inventory.
Rules
No enabled Ruff rules match this search.
-
PLR0133Two constants compared in a comparison, consider replacing
{left_constant} {op} {right_constant} -
PLR0202Class method defined without decorator
-
PLR0203Static method defined without decorator
-
PLR0206Cannot have defined parameters for properties
-
PLR0402Use
from {module} import {name}in lieu of alias -
PLR0904Too many public methods ({methods} > {max_methods})
-
PLR0914Too many local variables ({current_amount} > {max_amount})
-
PLR0916Too many Boolean expressions ({expressions} > {max_expressions})
-
PLR0917Too many positional arguments ({c_pos} > {max_pos})
-
PLR1702Too many nested blocks ({nested_blocks} > {max_nested_blocks})
-
PLR1704Redefining argument with the local name
{name} -
PLR1708Explicit
raise StopIterationin generator -
PLR1711Useless
returnstatement at end of function -
PLR1712Unnecessary temporary variable
-
PLR1714Consider merging multiple comparisons:
{expression}. Use asetif the elements are hashable. -
PLR1716Contains chained boolean comparison that can be simplified
-
PLR1722Use
sys.exit()instead of{name} -
PLR1730Replace
ifstatement with{replacement} -
PLR1733Unnecessary lookup of dictionary value by key
-
PLR1736List index lookup in
enumerate()loop -
PLR2004Magic value used in comparison, consider replacing
{value}with a constant variable -
PLR2044Line with empty comment
-
PLR5501Use
elifinstead ofelsethenif, to reduce indentation -
PLR6104Use
{operator}to perform an augmented assignment directly -
PLR6201Use a set literal when testing for membership
-
PLW0108Lambda may be unnecessary; consider inlining inner function
-
PLW0120elseclause on loop without abreakstatement; remove theelseand dedent its contents -
PLW0127Self-assignment of variable
{name} -
PLW0128Redeclared variable
{name}in assignment -
PLW0129Asserting on an empty string literal will never pass
-
PLW0131Named expression used without context
-
PLW0133Missing
raisestatement on exception -
PLW0177Comparing against a NaN value; use
math.isnaninstead -
PLW0211First argument of a static method should not be named
{argument_name} -
PLW0244Slot
{slot_name}redefined from base class{base} -
PLW0245supercall is missing parentheses -
PLW0406Module
{name}imports itself -
PLW0602Using global for
{name}but no assignment is done -
PLW0603Using the global statement to update
{name}is discouraged -
PLW0604globalat module level is redundant