Ruff
902 rules ruff@0.16.8
Complete effective rule inventory.
Rules
No enabled Ruff rules match this search.
-
PYI003Unrecognized
sys.version_infocheck -
PYI004Version comparison must use only major and minor version
-
PYI005Version comparison must be against a length-{expected_length} tuple
-
PYI006Use
<or>=forsys.version_infocomparisons -
PYI007Unrecognized
sys.platformcheck -
PYI008Unrecognized platform
{platform} -
PYI009Empty body should contain
..., notpass -
PYI010Function body must contain only
... -
PYI011Only simple default values allowed for typed arguments
-
PYI012Class body must not contain
pass -
PYI013Non-empty class body must not contain
... -
PYI014Only simple default values allowed for arguments
-
PYI015Only simple default values allowed for assignments
-
PYI016Duplicate union member
{} -
PYI017Stubs should not contain assignments to attributes or multiple targets
-
PYI018Private {type_var_like_kind}
{type_var_like_name}is never used -
PYI019Use
Selfinstead of custom TypeVar{} -
PYI020Quoted annotations should not be included in stubs
-
PYI021Docstrings should not be included in stubs
-
PYI024Use
typing.NamedTupleinstead ofcollections.namedtuple -
PYI025Use
from collections.abc import Set as AbstractSetto avoid confusion with thesetbuiltin -
PYI026Use
{module}.TypeAliasfor type alias, e.g.,{name}: TypeAlias = {value} -
PYI029Defining
{name}in a stub is almost always redundant -
PYI030Multiple literal members in a union. Use a single literal, e.g.
Literal[{}] -
PYI032Prefer
objecttoAnyfor the second parameter to{method_name} -
PYI033Don't use type comments
-
PYI034__new__methods usually returnselfat runtime -
PYI035{name}in a stub file must have a value, as it has the same semantics as{name}at runtime -
PYI036Star-args in
{method_name}should be annotated withobject -
PYI041Use
{supertype}instead of{subtype} | {supertype} -
PYI042Type alias
{name}should be CamelCase -
PYI043Private type alias
{name}should not be suffixed withT(theTsuffix implies that an object is aTypeVar) -
PYI044from __future__ import annotationshas no effect in stub files, since type checkers automatically treat stubs as having those semantics -
PYI045__aiter__methods should return anAsyncIterator, not anAsyncIterable -
PYI046Private protocol
{name}is never used -
PYI047Private TypeAlias
{name}is never used -
PYI048Function body must contain exactly one statement
-
PYI049Private TypedDict
{name}is never used -
PYI050Prefer
{module}.NeveroverNoReturnfor argument annotations -
PYI051Literal[{literal}]is redundant in a union with{builtin_type}