Ruff
902 rules ruff@0.16.8
Complete effective rule inventory.
Rules
No enabled Ruff rules match this search.
-
UP004Class
{name}inherits fromobject -
UP005{alias}is deprecated, use{target} -
UP006Use
{to}instead of{from}for type annotation -
UP007Use
X | Yfor type annotations -
UP008Use
super()instead ofsuper(__class__, self) -
UP009UTF-8 encoding declaration is unnecessary
-
UP010Unnecessary
__future__import{import}for target Python version -
UP011Unnecessary parentheses to
functools.lru_cache -
UP012Unnecessary call to
encodeas UTF-8 -
UP013Convert
{name}fromTypedDictfunctional to class syntax -
UP014Convert
{name}fromNamedTuplefunctional to class syntax -
UP015Unnecessary mode argument
-
UP017Use
datetime.UTCalias -
UP018Unnecessary
{literal_type}call (rewrite as a literal) -
UP019{}.Textis deprecated, usestr -
UP020Use builtin
open -
UP021universal_newlinesis deprecated, usetext -
UP022Prefer
capture_outputover sendingstdoutandstderrtoPIPE -
UP023cElementTreeis deprecated, useElementTree -
UP024Replace aliased errors with
OSError -
UP025Remove unicode literals from strings
-
UP026mockis deprecated, useunittest.mock -
UP028Replace
yieldoverforloop withyield from -
UP029Unnecessary builtin import:
{import} -
UP030Use implicit references for positional format fields
-
UP031Use format specifiers instead of percent format
-
UP032Use f-string instead of
formatcall -
UP033Use
@functools.cacheinstead of@functools.lru_cache(maxsize=None) -
UP034Avoid extraneous parentheses
-
UP035Import from
{target}instead: {names} -
UP036Version block is outdated for minimum Python version
-
UP037Remove quotes from type annotation
-
UP039Unnecessary parentheses after class definition
-
UP040Type alias
{name}uses {type_alias_method} instead of thetypekeyword -
UP041Replace aliased errors with
TimeoutError -
UP042Class {name} inherits from both
strandenum.Enum -
UP043Unnecessary default type arguments
-
UP044Use
*for unpacking -
UP045Use
X | Nonefor type annotations -
UP046Generic class
{name}usesGenericsubclass instead of type parameters