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:
- Dependency analysis:
FawltyDeps
⧉ (may produce false positives; see Adjustments) - Code formatting and linting:
ruff
⧉ (all checks enabled by default) - Docstring coverage:
interrogate
⧉ (checks all functions, classes, and modules, including private ones) - Type checking:
basedpyright
⧉ (run as a separatetyping
step)
Adjustments¶
You can configure most of the settings in pyproject.toml
(see Configuration), for example:
- Lower docstring coverage threshold: Adjust
fail-under
in[tool.interrogate]
. - Handle false positives in
FawltyDeps
: Add dependencies toignore_undeclared
,ignore_undefined
orignore_unused
under[tool.fawltydeps]
(ensure correctness before ignoring).
Code sources¶
pyproject.toml
.github/workflows/python*.yml