A function's body is only pass, with no docstring or comment saying why it is empty
What it finds
An empty function is either unfinished or deliberately does nothing, for example as a hook for subclasses; a docstring or comment tells which. Abstract methods, overloads, methods of protocols and stubs written with ... are left alone.
From the rule's source, empty_function.rs.
Turn it on, off or suppress it
The rule runs from the strict tier up. To turn it on in a lower tier, give it a level in tx0.toml:
[rules]
"tx0/python:empty-function" = "note"To keep one finding, suppress it with a reason. tx0 suppress ID --reason "..." writes the comment on the line before the code:
# tx0: ignore[tx0/python:empty-function] reason="..."tx0 explain tx0/python:empty-function shows the same in the terminal. Found a false positive? Report it.