Skip to content

Commit

Permalink
ci: Add yesqa pre-commit hook (#1932)
Browse files Browse the repository at this point in the history
* Add and apply yesqa pre-commit hook.
* Move flake8 options 'count' and 'statistics' from the flake8 config
in setup.cfg to args for the flake8 pre-commit hook to avoid problems
with yesqa.
   - c.f. asottile/yesqa#132
  • Loading branch information
matthewfeickert authored Aug 10, 2022
1 parent 1494b66 commit b58a6b7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,16 @@ repos:
- id: blacken-docs
additional_dependencies: [black==22.6.0]

- repo: https://github.com/asottile/yesqa
rev: v1.4.0
hooks:
- id: yesqa

- repo: https://github.com/PyCQA/flake8
rev: 5.0.2
hooks:
- id: flake8
args: ["--count", "--statistics"]

- repo: https://github.com/nbQA-dev/nbQA
rev: 1.4.0
Expand Down
2 changes: 0 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,3 @@ console_scripts =
# E501: line too long
extend-ignore = E203, E402, E501
max-line-length = 88
count = True
statistics = True
2 changes: 1 addition & 1 deletion src/pyhf/infer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def hypotest(
return tuple(_returns) if len(_returns) > 1 else _returns[0]


from pyhf.infer import intervals # noqa: F401
from pyhf.infer import intervals

__all__ = ["hypotest", "calculators", "intervals", "mle", "test_statistics", "utils"]

Expand Down

0 comments on commit b58a6b7

Please sign in to comment.