Skip to content

Latest commit

 

History

History
47 lines (32 loc) · 2.46 KB

File metadata and controls

47 lines (32 loc) · 2.46 KB

General Developer Guide

Formatting and Linting

Tools

Most of the formatting and linting tools listed below (except for mypy, the Python static type checker) have been registered as pre-commit hooks. The hooks can be installed using the command:

Register the pre-commit hooks to run when running git commit

pre-commit install

After the installation, those hooks are automatically triggered every time a commit is made, and are applied on files that are changed in the commit. Use the following command if you want to run hooks on all files (regardless whether the files are changed or not).

# Run pre-commit hooks over all the files.
pre-commit run --all-files

Coding Style

Please follow the following coding style guide:

Integration of Checkers with Editors and IDEs

We recommend to integrate frequently used checkers (which were installed with the pre-commit hooks, as discussed above) into your editors and IDEs, so that they are automatically run on save (and you can stop worrying about running them manually yourself). We provide some examples of how they can be set up:

IDE black ruff mypy
VSCode ms-python.black-formatter charliermarsh.ruff ms-python.mypy-type-checker