Ruff
903 rules ruff@0.17.0
Complete effective rule inventory.
Rules
No enabled Ruff rules match this search.
-
ARG005Unused lambda argument:
{name} -
ASYNC100A
with {method_name}(...):context does not contain anyawaitstatements. This makes it pointless, as the timeout can only be triggered by a checkpoint. -
ASYNC105Call to
{method_name}is not immediately awaited -
ASYNC109Async function definition with a
timeoutparameter -
ASYNC110Use
{module}.Eventinstead of awaiting{module}.sleepin awhileloop -
ASYNC115Use
{module}.lowlevel.checkpoint()instead of{module}.sleep(0) -
ASYNC116{module}.sleep()with >24 hour interval should usually be{module}.sleep_forever() -
ASYNC119Yield in context manager in async generator may not trigger cleanup
-
ASYNC210Async functions should not call blocking HTTP methods
-
ASYNC212Blocking httpx method {name}.{call}() in async context, use httpx.AsyncClient
-
ASYNC220Async functions should not create subprocesses with blocking methods
-
ASYNC221Async functions should not run processes with blocking methods
-
ASYNC222Async functions should not wait on processes with blocking methods
-
ASYNC230Async functions should not open files with blocking methods like
open -
ASYNC240Async functions should not perform blocking {path_library} operations
-
ASYNC250Blocking call to
input()in async context -
ASYNC251Async functions should not call
time.sleep -
B002Python does not support the unary prefix increment operator (
++) -
B003Assigning to
os.environdoesn't clear the environment -
B004Using
hasattr(x, "__call__")to test if x is callable is unreliable. Usecallable(x)for consistent results. -
B005Using
.{strip}()with multi-character strings is misleading -
B006Do not use mutable data structures for argument defaults
-
B007Loop control variable
{name}not used within loop body -
B008Do not perform function call
{name}in argument defaults; instead, perform the call within the function, or read the default from a module-level singleton variable -
B009Do not call
getattrwith a constant attribute value. It is not any safer than normal property access. -
B010Do not call
setattrwith a constant attribute value. It is not any safer than normal property access. -
B011Do not
assert False(python -Oremoves these calls), raiseAssertionError() -
B012{name}insidefinallyblocks cause exceptions to be silenced -
B013A length-one tuple literal is redundant in exception handlers
-
B014Exception handler with duplicate exception:
{name} -
B015Pointless comparison. Did you mean to assign a value? Otherwise, prepend
assertor remove it. -
B016Cannot raise a literal. Did you intend to return it or raise an Exception?