Stale Docstring Detection
Legacy Doc-AI helps you identify stale docstrings by comparing function signatures against their documentation. When code evolves but docstrings don't, you get stale docstring detection flags that highlight the drift.
How It Works
The tool parses your Python source and extracts function definitions. It then checks each docstring for:
- Missing parameters that exist in the signature
- Outdated parameter descriptions
- Return type mismatches
Marshmallow Example
Consider this marshmallow schema validator:
def validate_user(data, strict=False):
"""
Validate user data.
"""
# Now supports email validation
...
The function signature changed to support email validation, but the docstring never got updated. stale docstring detection flags this mismatch so you can fix it.
Benefits
Running stale docstring detection before deployment catches documentation drift early. This reduces confusion for developers and improves API reliability.
Want to keep all your docs in sync? See pricing plans for batch processing options.