Skip to content

Commit

Permalink
Pre-commit: move pytest and pylint config to pyproject.toml
Browse files Browse the repository at this point in the history
Requirement of `pylint` is upped as support for `pyproject.toml` was
only added in v2.6.0.

Also remove all explicit marking of tests with the `aiida_profile`
fixture. This is automatically loaded for the entire session by calling
`pytest_plugins = ['aiida.manage.tests.pytest_fixtures']` in the
`conftext.py`.

Finally, move `yapf` pre-commit hook before the `pylint` one. Often
`yapf` will correct mistakes that `pylint` will otherwise complain about.
  • Loading branch information
sphuber committed Oct 5, 2020
1 parent 59b957a commit 9d6ea64
Show file tree
Hide file tree
Showing 49 changed files with 281 additions and 764 deletions.
20 changes: 10 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,17 @@ repos:
tests/.*.in$
)$
- repo: https://github.com/PyCQA/pylint
rev: pylint-2.5.2
- repo: https://github.com/PyCQA/pydocstyle
rev: 5.0.2
hooks:
- id: pylint
language: system
- id: pydocstyle
exclude: &exclude_files >
(?x)^(
aiida_quantumespresso/calculations/pwimmigrant.*|
aiida_quantumespresso/parsers/.*|
docs/.*|
tests/.*(?<!\.py)$
)$

- repo: https://github.com/PyCQA/pydocstyle
rev: 5.0.2
hooks:
- id: pydocstyle
exclude: *exclude_files
args: ['--ignore=D104,D202,D203,D213']

- repo: https://github.com/pre-commit/mirrors-yapf
Expand All @@ -41,6 +34,13 @@ repos:
types: [python]
args: ['-i']

- repo: https://github.com/PyCQA/pylint
rev: pylint-2.6.0
hooks:
- id: pylint
language: system
exclude: *exclude_files

- repo: local
hooks:
- id: version-number
Expand Down
Loading

0 comments on commit 9d6ea64

Please sign in to comment.