Ruff
909 rules ruff@0.17.6
Complete effective rule inventory.
Rules
No enabled Ruff rules match this search.
-
TID254{name}should be imported lazily -
TID255Lazy import
{name}is resolved immediately -
TRY002Create your own exception
-
TRY003Avoid specifying long messages outside the exception class
-
TRY004Prefer
TypeErrorexception for invalid type -
TRY201Use
raisewithout specifying exception name -
TRY203Remove exception handler; error is immediately re-raised
-
TRY300Consider moving this statement to an
elseblock -
TRY301Abstract
raiseto an inner function -
TRY400Use
logging.exceptioninstead oflogging.error -
TRY401Redundant exception object included in
logging.exceptioncall -
unnecessary-regular-expression-compileCompiled regular expression is used only once
-
UP001__metaclass__ = typeis implied -
UP003Use
{}instead oftype(...) -
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