Set up pre-commit hooks

- add pre-commit hooks:
  + run `nox -s lint` on staged *.py files
  + run common pre-commit hooks for validations that could not be
    achieved with tools in the develop environment so easily
- add pre-merge hook:
  + run `nox -s _pre-commit-test-hook` before merges
    * ignores the paths to staged files
      passed in by the pre-commit framework
    * runs all test cases instead
This commit is contained in:
Alexander Hess 2024-09-10 02:32:56 +02:00
commit 7a5246556a
Signed by: alexander
GPG key ID: 344EA5AB10D868E0
5 changed files with 196 additions and 2 deletions

View file

@ -32,6 +32,8 @@ python = "^3.9"
[tool.poetry.group.dev.dependencies]
pre-commit = "^3.8"
# Code formatters
autoflake = "^2.3"
black = "^24.8"