Ruff
902 rules ruff@0.16.8
Complete effective rule inventory.
Rules
No enabled Ruff rules match this search.
-
FURB118Use
operator.{operator}instead of defining a {target} -
FURB122Use of
{}.writein a for loop -
FURB129Instead of calling
readlines(), iterate over file object directly -
FURB131Prefer
clearover deleting a full slice -
FURB132Use
{suggestion}instead of check andremove -
FURB136Replace
ifexpression with{min_max}call -
FURB140Use
itertools.starmapinstead of the generator -
FURB142Use of
set.{}()in a for loop -
FURB145Prefer
copymethod over slicing -
FURB148enumeratevalue is unused, usefor x in range(len(y))instead -
FURB152Replace
{literal}withmath.{constant} -
FURB154Use of repeated consecutive
{} -
FURB156Use of hardcoded string charset
-
FURB157Verbose expression in
Decimalconstructor -
FURB161Use of
bin({existing}).count('1') -
FURB162Unnecessary timezone replacement with zero offset
-
FURB163Prefer
math.{log_function}({arg})overmath.logwith a redundant base -
FURB164Verbose method
{method_name}in{constructor}construction -
FURB166Use of
intwith explicitbase={base}after removing prefix -
FURB167Use of regular expression alias
re.{} -
FURB168Prefer
isoperator overisinstanceto check if an object isNone -
FURB169When checking against
None, use{}instead of comparison withtype(None) -
FURB171Membership test against single-item container
-
FURB177Prefer
Path.cwd()overPath().resolve()for current-directory lookups -
FURB180Use of
metaclass=abc.ABCMetato define abstract base class -
FURB181Use of hashlib's
.digest().hex() -
FURB187Use of assignment of
reversedon list{name} -
FURB188Prefer
str.removeprefix()over conditionally replacing with slice. -
FURB189Subclassing
{subclass}can be error prone, usecollections.{replacement}instead -
FURB192Prefer
minoversorted()to compute the minimum value in a sequence -
G001Logging statement uses
str.format -
G002Logging statement uses
% -
G003Logging statement uses
+ -
G004Logging statement uses f-string
-
G010Logging statement uses
warninstead ofwarning -
G101Logging statement uses an
extrafield that clashes with aLogRecordfield:{key} -
G201Logging
.exception(...)should be used instead of.error(..., exc_info=True) -
G202Logging statement has redundant
exc_info -
I001Import block is un-sorted or un-formatted
-
I002Missing required import:
{name}