Ruff
902 rules ruff@0.16.8
Complete effective rule inventory.
Rules
No enabled Ruff rules match this search.
-
PD004.notnais preferred to.notnull; functionality is equivalent -
PD007.ixis deprecated; use more explicit.locor.iloc -
PD008Use
.locinstead of.at. If speed is important, use NumPy. -
PD009Use
.ilocinstead of.iat. If speed is important, use NumPy. -
PD010.pivot_tableis preferred to.pivotor.unstack; provides same functionality -
PD011Use
.to_numpy()or.arrayinstead of.values -
PD012Use
.read_csvinstead of.read_tableto read CSV files -
PD013.meltis preferred to.stack; provides same functionality -
PD015Use
.mergemethod instead ofpd.mergefunction. They have equivalent functionality. -
PD101Using
series.nunique()for checking that a series is constant is inefficient -
PERF101Do not cast an iterable to
listbefore iterating over it -
PERF102When using only the {subset} of a dict use the
{subset}()method -
PERF203try-exceptwithin a loop incurs performance overhead -
PERF401Use {message_str} to create a transformed list
-
PERF402Use
listorlist.copyto create a copy of a list -
PERF403Use a dictionary comprehension instead of {modifier} for-loop
-
PGH003Use specific rule codes when ignoring type issues
-
PGH004Use specific rule codes when using
noqa -
PGH005Mock method should be called:
{name} -
PIE790Unnecessary
passstatement -
PIE794Class field
{name}is defined multiple times -
PIE796Enum contains duplicate value:
{value} -
PIE800Unnecessary spread
** -
PIE804Unnecessary
dictkwargs -
PIE807Prefer
{container}over useless lambda -
PIE808Unnecessary
startargument inrange -
PIE810Call
{attr}once with atuple -
PLC0105{kind}name "{param_name}" does not reflect its {variance}; consider renaming it to "{replacement_name}" -
PLC0131{kind}cannot be both covariant and contravariant -
PLC0132{kind}name{param_name}does not match assigned variable name{var_name} -
PLC0205Class
__slots__should be a non-string iterable -
PLC0206Extracting value from dictionary without calling
.items() -
PLC0207String is split more times than necessary
-
PLC0208Use a sequence type instead of a
setwhen iterating over values -
PLC0415importshould be at the top-level of a file -
PLC1802len({expression})used as condition without comparison -
PLC1901{existing}can be simplified to{replacement}as an empty string is falsey -
PLC2401{kind} name
{name}contains a non-ASCII character -
PLC2403Module alias
{name}contains a non-ASCII character -
PLC2801Unnecessary dunder call to
{method}. {replacement}.