Skip to content

Commit

Permalink
style: add more pre-commit checks
Browse files Browse the repository at this point in the history
  • Loading branch information
henryiii committed Aug 5, 2020
1 parent 92dec03 commit e448c8c
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: pre-commit/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Check manifest
uses: pre-commit/[email protected]
with:
extra_args: --hook-stage manual check-manifest

checks:
runs-on: ubuntu-latest
Expand Down
16 changes: 14 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@ repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: check-added-large-files
- id: debug-statements
- id: end-of-file-fixer
- id: fix-encoding-pragma
- id: mixed-line-ending
- id: requirements-txt-fixer
- id: trailing-whitespace
- id: check-merge-conflict
- id: check-added-large-files
- id: check-case-conflict
- id: check-merge-conflict
- id: check-symlinks
- id: check-yaml

Expand All @@ -21,6 +25,14 @@ repos:
hooks:
- id: check-manifest
additional_dependencies: [setuptools_scm, toml]
stages: [manual]

- repo: https://github.com/pycqa/flake8
rev: 3.8.3
hooks:
- id: flake8
exclude: docs/conf.py
additional_dependencies: [flake8-bugbear, flake8-print]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.782
Expand Down
7 changes: 7 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,12 @@ ignore =

[mypy]
strict=True

[mypy-hepunits.version]
ignore_missing_imports = True


[flake8]
max-complexity = 12
ignore = E203, E231, E501, E722, W503, F401, F403, F405
select = C,E,F,W,B,B9,T

0 comments on commit e448c8c

Please sign in to comment.