make pep8— lint checkmake isort— fix import ordering issuesmake format— fix other Python source code formatting issuesmypy— type check (no arguments; checks only files configured in.mypy.ini)
-
In addition to the directives in this document, also respect those contained in
CONTRIBUTING.rst -
After making any code changes, always verify them with
make pep8andmypy -
Don't worry about manually ordering imports. Instead, just run
make isort -
When extracting code out of a module covered by
mypyinto a new module, remember to add the new module to.mypy.ini. Ask for confirmation before making changes that would reducemypycoverage -
Remember that in
.mypy.ini, there are two ways to configure a Python module for coverage bymypy: explicitly, by listing its fully qualified module path in themodulessection of that file, or implicitly, by listing its parent or ancestor package in thepackagessection -
Prefer to use
git mvwhen renaming or moving files -
Do not commit any changes unless explicitly asked to do so. However, it's OK to propose committing changes. When committing changes, include a trailer in the commit message that attributes the change to you
-
You can usually disregard any files under
attic/, except for reference. Never modify the attic, except when instructed to move files there. -
Passing
--config-file .mypy.initomypyis unnecessary; since.mypy.iniis the default config -
Do not quote type hints in annotations. The project uses Python 3.14, which defers evaluation of annotations by default (PEP 649), so forward references and
TYPE_CHECKING-guarded imports work without quotes