Skip to content

Commit

Permalink
Add pre-commit hooks, black, mypy, pytest
Browse files Browse the repository at this point in the history
  • Loading branch information
eivindsjovold committed Aug 23, 2022
1 parent 524043e commit ae1eb3f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
21 changes: 21 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
repos:
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
language_version: python3
args: []
exclude: gen/
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.971
hooks:
- id: mypy
#This can potentially be a slow pre-commit hook.
- repo: local
hooks:
- id: pytest-check
name: pytest-check
entry: pytest
language: system
pass_filenames: false
always_run: true
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@
include_package_data=True,
install_requires=["scipy", "numpy", "dacite"],
python_requires=">=3.8",
extras_require={"dev": ["pytest", "black", "mypy"]},
extras_require={"dev": ["pytest", "black", "mypy", "pre-commit"]},
)

0 comments on commit ae1eb3f

Please sign in to comment.