checks.docs.DocsCheck
checks.docs.DocsCheck()Check for documentation presence and quality.
Verifies that the package has a README file and optionally checks that public modules, classes, and functions have docstrings.
Attributes
name :-
The check identifier (“docs”).
description :-
Human-readable description of this check.
README_FILENAMES :-
List of recognized README file names.
Examples
Run the docs check with defaults:
>>> from pathlib import Path
>>> check = DocsCheck()
>>> result = check.run(Path("."), {"enabled": True})
>>> result.name
'docs'Enable docstring checking:
>>> config = {"enabled": True, "check_docstrings": True}
>>> result = check.run(Path("."), config)Make README optional:
>>> config = {"enabled": True, "require_readme": False}
>>> result = check.run(Path("."), config)Methods
| Name | Description |
|---|---|
| run | Check documentation presence and quality. |
run
checks.docs.DocsCheck.run(package_path, config)Check documentation presence and quality.
Looks for a README file and optionally scans code for missing docstrings on public items.
Parameters
Returns
: CheckResult-
A CheckResult with:
: CheckResult-
- OK status if all documentation requirements met
: CheckResult-
- NOTE status if minor improvements suggested
: CheckResult-
- WARNING status if README missing (when required)