Skip to content
Sarj Code Standards

redundant-module-docstring

Delete top-of-file module docstrings without a detected runtime or documentation consumer.

Why

Module prose creates a second maintenance surface; names and code structure should explain the implementation, with hidden constraints kept next to their owner.

Fix

Delete the module docstring. Preserve legal notices as comments, express ordinary meaning through names and types, and move a necessary hidden constraint next to the code it governs. Keep externally consumed documentation with an explained exact-code exception.

Examples

Before — flagged Delete the module's implementation walkthrough
app/service.py
"""Service entry points.
Coordinates requests.
"""
VALUE = 1
After — preferred Keep a module description consumed at runtime
app/service.py
"""Service command help."""
DESCRIPTION = __doc__
Autofix output
app/service.py
VALUE = 1

Formerly: module-docstring-restates-path