Ruff
903 rules ruff@0.17.0
Complete effective rule inventory.
Rules
No enabled Ruff rules match this search.
-
RUF017Avoid quadratic list summation
-
RUF018Avoid assignment expressions in
assertstatements -
RUF019Unnecessary key check before dictionary access
-
RUF020{never_like} | Tis equivalent toT -
RUF021Parenthesize
a and bexpressions when chainingandandortogether, to make the precedence clear -
RUF022__all__is not sorted -
RUF023{}.__slots__is not sorted -
RUF024Do not pass mutable objects as values to
dict.fromkeys -
RUF026default_factoryis a positional-only argument todefaultdict -
RUF027Possible f-string without an
fprefix -
RUF028This suppression comment is invalid because {}
-
RUF029Function
{name}is declaredasync, but doesn'tawaitor useasyncfeatures. -
RUF030print()call inassertstatement is likely unintentional -
RUF031Use parentheses for tuples in subscripts
-
RUF032Decimal()called with float literal argument -
RUF033__post_init__method with argument defaults -
RUF034Useless
if-elsecondition -
RUF036Nonenot at the end of the type union. -
RUF037Unnecessary empty iterable within a deque call
-
RUF038Literal[True, False, ...]can be replaced withLiteral[...] | bool -
RUF039First argument to {call} is not raw string
-
RUF040Non-string literal used as assert message
-
RUF041Unnecessary nested
Literal -
RUF043Pattern passed to
match=contains metacharacters but is neither escaped nor raw -
RUF045Assignment without annotation found in dataclass body
-
RUF046Value being cast to
intis already an integer -
RUF047Empty
elseclause -
RUF048__version__may contain non-integral-like elements -
RUF049An enum class should not be decorated with
@dataclass -
RUF050Empty
ifstatement -
RUF051Use
popinstead ofkey in dictfollowed bydel dict[key] -
RUF052Local dummy variable
{}is accessed