diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..3969cca --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,28 @@ +default_stages: [commit, push] +repos: + - repo: https://github.com/psf/black + rev: 24.8.0 + hooks: + - id: black + args: [--line-length=88] + exclude: ^(venv/|docs/) + types: ['python'] + - repo: https://github.com/PyCQA/flake8 + rev: 7.1.1 + hooks: + - id: flake8 + args: + - --max-line-length=88 + - --ignore=F401,E501,W503,E731,E743,E741 + exclude: ^(venv/|docs/) + types: ['python'] + - repo: local + hooks: + - id: pytest + name: pytest + entry: ./.venv/bin/pytest --nbval-lax + language: system + types: [python] + pass_filenames: false + always_run: true +