Why this matters
Baseline documentation improves IDE help, searchability, and onboarding.
All public modules, classes, and functions must include a docstring immediately after the definition, using PEP 257 conventions (one-line summary + optional sections like Args, Returns, Raises).
Baseline documentation improves IDE help, searchability, and onboarding.
Side-by-side examples engineers can pattern-match during review.
def calculate(a: int, b: int) -> int:
return a + bdef calculate(a: int, b: int) -> int:
"""Return the sum of two integers.
Args:
a (int): First addend.
b (int): Second addend.
Returns:
int: a + b.
"""
return a + bclass User:
"""Domain user entity."""
...class User:
passFrom the same buckets as this rule.