Skip to content

redundant-module-docstring

Module docstring only repeats the filename and, optionally, its immediate parent package.

Why

A one-line restatement of a module path duplicates information already visible to readers and search tools.

Fix

Remove the restatement after confirming module __doc__ is not an external documentation or runtime contract. Clarify author-controlled names or exports, and keep durable constraints.

Examples

Before — flagged Docstring repeats the module path
celery/utils/log.py
"""Logging utilities."""
VALUE = 1
After — preferred Docstring records a module contract
celery/utils/log.py
"""Logging utilities redact credentials."""
VALUE = 1

Formerly: module-docstring-restates-path