A public class has no docstring

tx0/python:undocumented-classstrictnotestyle

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.

Example from the rule's tests
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
Highlighted lines are the ones tx0 reports, with its message under each; the other lines are left alone.

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:

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.