Ruff
903 rules ruff@0.17.0
Complete effective rule inventory.
Rules
No enabled Ruff rules match this search.
-
PYI061Use
Nonerather thanLiteral[None] -
PYI062Duplicate literal member
{} -
PYI063Use PEP 570 syntax for positional-only parameters
-
PYI064Final[Literal[{literal}]]can be replaced with a bareFinal -
PYI066Put branches for newer Python versions first when branching on
sys.version_infocomparisons -
pytest-fixture-autouseAvoid using
autouse=Trueinpytest.fixturedecorators -
Q000Single quotes found but double quotes preferred
-
Q001Single quote multiline found but double quotes preferred
-
Q002Single quote docstring found but double quotes preferred
-
Q003Change outer quotes to avoid escaping inner quotes
-
Q004Unnecessary escape on inner quote character
-
RET501Do not explicitly
return Nonein function if it is the only possible return value -
RET502Do not implicitly
return Nonein function able to return non-Nonevalue -
RET503Missing explicit
returnat the end of function able to return non-Nonevalue -
RET504Unnecessary assignment to
{name}beforereturnstatement -
RET505Unnecessary
{branch}afterreturnstatement -
RET506Unnecessary
{branch}afterraisestatement -
RET507Unnecessary
{branch}aftercontinuestatement -
RET508Unnecessary
{branch}afterbreakstatement -
RSE102Unnecessary parentheses on raised exception
-
RUF002Docstring contains ambiguous {}. Did you mean {}?
-
RUF003Comment contains ambiguous {}. Did you mean {}?
-
RUF005Consider
{expression}instead of concatenation -
RUF006Store a reference to the return value of
{expr}.{method} -
RUF007Prefer
itertools.pairwise()overzip()when iterating over successive pairs -
RUF008Do not use mutable default values for dataclass attributes
-
RUF009Do not perform function call
{name}in dataclass defaults -
RUF010Use explicit conversion flag
-
RUF012Mutable default value for class attribute
-
RUF013PEP 484 prohibits implicit
Optional -
RUF015Prefer
next({iterable})over single element slice -
RUF016Slice in indexed access to type
{value_type}uses type{index_type}instead of an integer