diff options
| author | Colin Wilk <colin.wilk@tum.de> | 2023-10-09 12:04:12 +0200 |
|---|---|---|
| committer | Colin Wilk <colin.wilk@tum.de> | 2023-10-09 12:58:13 +0200 |
| commit | 4a02c065a2f06ea6350ddcda122217dfa6ded105 (patch) | |
| tree | 014ef60dcc52d48b48d4d6ba152c0cffe09065a1 | |
| parent | c61d6fc80d7c20f580ad111db59352b8eae7b7da (diff) | |
| download | szuruboorupy-4a02c065a2f06ea6350ddcda122217dfa6ded105.tar.gz szuruboorupy-4a02c065a2f06ea6350ddcda122217dfa6ded105.zip | |
Add more pre-commit hooks
* Add a few general pre-commit hooks for checking
format/parsability/git-related-issues.
* Add yamllint for properly linting the pre-commit.yaml.
* Add mypy for additionally checking types since it seems like a more
active project.
Signed-off-by: Colin Wilk <colin.wilk@tum.de>
| -rw-r--r-- | .pre-commit-config.yaml | 108 |
1 files changed, 68 insertions, 40 deletions
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 85dac3e..a6c922f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,41 +1,69 @@ +--- repos: -- repo: https://github.com/python-poetry/poetry - rev: 'master' - hooks: - - id: poetry-check - - id: poetry-install - - id: poetry-lock - - id: poetry-export - - -- repo: https://github.com/psf/black - rev: 23.9.1 - hooks: - - id: black - - -- repo: https://github.com/pycqa/pydocstyle - rev: 6.3.0 - hooks: - - id: pydocstyle - - -- repo: local - hooks: - - id: pylint - name: pylint - entry: pylint - language: system - types: [python] - args: - [ - "-rn", # Only display messages - "-sn", # Don't display the score - ] - - - id: pytype - name: pytype - entry: poetry run pytype - language: system - types: [python] - args: ["--keep-going"] + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.4.0 + hooks: + - id: check-added-large-files + - id: check-ast + - id: check-case-conflict + - id: check-merge-conflict + - id: check-toml + - id: check-yaml + - id: check-vcs-permalinks + - id: end-of-file-fixer + - id: trailing-whitespace + + + - repo: https://github.com/adrienverge/yamllint.git + rev: v1.29.0 + hooks: + - id: yamllint + args: [--strict] + + - repo: https://github.com/python-poetry/poetry + rev: 'master' + hooks: + - id: poetry-check + - id: poetry-install + - id: poetry-lock + - id: poetry-export + + + - repo: https://github.com/psf/black + rev: 23.9.1 + hooks: + - id: black + + + - repo: https://github.com/pycqa/pydocstyle + rev: 6.3.0 + hooks: + - id: pydocstyle + + + - repo: https://github.com/pre-commit/mirrors-mypy + rev: v1.5.1 + hooks: + - id: mypy + additional_dependencies: [types-requests] + + + - repo: local + hooks: + - id: pylint + name: pylint + entry: pylint + language: system + types: [python] + args: + [ + "-rn", # Only display messages + "-sn", # Don't display the score + ] + + - id: pytype + name: pytype + entry: poetry run pytype + language: system + types: [python] + args: ["--keep-going"] |