Python¶
Important
For testing details, see the tests documentation.
As the project's core language, Python undergoes the most extensive linting.
Checks and fixes¶
The following tools are used, in order:
- Code formatting and linting:
ruff⧉ (all checks enabled by default) - Type checking:
basedpyright⧉ (run as a separatetypingstep) - Docstring coverage:
interrogate⧉ (checks all functions, classes, and modules, including private ones) - Static dependency analysis:
FawltyDeps⧉ (may produce false positives; see Adjustments)
Adjustments¶
You can configure most of the settings in pyproject.toml (see Configuration), for example:
- Lower docstring coverage threshold: Adjust
fail-underin[tool.interrogate]. - Handle false positives in
FawltyDeps: Add dependencies toignore_undeclared,ignore_undefinedorignore_unusedunder[tool.fawltydeps](ensure correctness before ignoring).
Code sources¶
pyproject.toml.github/workflows/python*.yml