krrood.development_tools.agents.shipped_rules.documentation#

The rules on documentation.

Classes#

DocumentationRules

The rules on docstrings and comments.

Module Contents#

class krrood.development_tools.agents.shipped_rules.documentation.DocumentationRules(*args, **kwds)#

Bases: krrood.development_tools.agents.rule.Section

The rules on docstrings and comments.

DOCUMENT_EVERY_CONSTRUCT#
MEANINGFUL_DOCUMENTATION = 'Documentation is written in reStructuredText and is meaningful and non-trivial: it says...#
OVERRIDES_INHERIT_DOCSTRINGS = 'An implementation of an abstract method has no docstring and inherits the base one. An override...#
DOCSTRINGS_STATE_THE_CONTRACT = ('A docstring states what the code does and its contract, short and to the point. It never...#
SHORT_PROSE#
MEANINGFUL_COMMENTS = 'Comments are meaningful and DRY; remove comments that restate the code'#
SPHINX_ROLES = 'Reference code with Sphinx roles (`:func:`, `:class:`, `:attr:`, `:meth:`), never with plain...#
NO_CAPITALS_FOR_EMPHASIS = 'Never use all-caps words for emphasis in docstrings or comments; use RST emphasis (`*word*`)....#
FORMAT_WITH_THE_HOOK = "Always format modified Python files with ruff followed by docformatter, through the...#