This project uses Poetry to manage development dependencies and pre-commit to enforce code style and lints.
-
First, have Poetry installed.
Alternatively, you can install
pre-commit
directly usingpip
:pip install pre-commit
If you do this, skip to step 3 and omit
poetry run
from the command. -
To create a virtual environment and install dev dependencies, run:
poetry install --with=dev
-
Install the
pre-commit
git hook scripts to your local repository:poetry run pre-commit install
Now, work on your commit, and Git will run the pre-commit hooks before you are able to commit changes. The pre-commit hooks also run as CI checks on pull requests.