Skip to content

Commit

Permalink
Add other usefull pre-commit hooks suggested by scikit-hep
Browse files Browse the repository at this point in the history
  • Loading branch information
oshadura committed May 17, 2022
1 parent 0b6e8fd commit 8f61286
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 4 deletions.
35 changes: 31 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,40 @@ repos:
rev: v1.6.0
hooks:
- id: autopep8
- repo: https://github.com/PyCQA/flake8
- repo: https://github.com/pycqa/flake8
rev: 4.0.1
hooks:
- id: flake8
additional_dependencies: [flake8-bugbear, flake8-import-order, flake8-print]
- repo: https://github.com/psf/black
rev: stable
hooks:
- id: black

- repo: https://github.com/asottile/blacken-docs
rev: v1.12.1
hooks:
- id: blacken-docs
- repo: https://github.com/pycqa/isort
rev: 5.6.4
hooks:
- id: isort
args: ["--profile", "black"]
- repo: https://github.com/codespell-project/codespell
rev: v2.1.0
hooks:
- id: codespell
args: ["-L", "coffea_casa", "tests", "docs/*rst"]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.950
rev: v0.942
hooks:
- id: mypy
additional_dependencies: [types-all]
exclude: ^testing/resources/
name: mypy with Python 3.7
files: coffea_casa
additional_dependencies: ["dask", "distributed"]
args: ["--python-version=3.7"]
- id: mypy
name: mypy with Python 3.9
files: coffea_casa
additional_dependencies: ["dask", "distributed"]
args: ["--python-version=3.9"]
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ show_error_codes = true
show_error_context = true
no_implicit_optional = true
ignore_missing_imports = true
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]

# pyproject.toml
[tool.pytest.ini_options]
Expand Down
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ ignore =
E741,
# Too long lines (still not ready for it)
E501
# extend-ignore uses flake8's default ignore list, and adds to it
extend-ignore = E203, E501
max-line-length = 120

[versioneer]
Expand Down

0 comments on commit 8f61286

Please sign in to comment.