Skip to content

Commit

Permalink
added pre-commit hooks with isort, black and flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
cosimoNigro committed Sep 1, 2023
1 parent b72c94f commit a3f6089
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
18 changes: 18 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
repos:
# https://pycqa.github.io/isort/docs/configuration/black_compatibility.html#integration-with-pre-commit
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
args: ["--profile", "black", "--filter-files"]
- repo: https://github.com/psf/black
rev: 22.6.0
hooks:
- id: black
# https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html?highlight=other%20tools#flake8
- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
hooks:
- id: flake8
exclude: experiments
args: ["--count", "--max-line-length=100", "--extend-ignore=E203,E712,W503"]
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dependencies:
- pyyaml # needed to read astropy ecsv file
- matplotlib
- sherpa
- pre-commit
- pip:
- agnpy
- gammapy

0 comments on commit a3f6089

Please sign in to comment.