A public class has no docstring
What it finds
A class docstring says what its objects stand for; help() and documentation tools show it. Checked are classes whose name and enclosing classes do not start with an underscore, defined at module level or in another class. Stubs and test files are not checked.
From the rule's source, undocumented_class.rs.
class Reader:tx0 reports: this public class has no docstring class Options:tx0 reports: this public class has no docstring pass class Writer: """Writes files.""" class _Hidden: class Inner: pass def make(): class Local: pass return Local 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:undocumented-class" = "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:undocumented-class] reason="..."tx0 explain tx0/python:undocumented-class shows the same in the terminal. Found a false positive? Report it.