Created
December 10, 2021 16:31
-
-
Save lays147/09bf41096f49f342ffe3a0887692bebd to your computer and use it in GitHub Desktop.
Pre-commit for python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
default_stages: [commit, push] | |
repos: | |
- repo: https://github.com/pre-commit/pre-commit-hooks | |
rev: v4.0.1 | |
hooks: | |
- id: check-toml | |
- id: check-yaml | |
- id: check-docstring-first | |
- id: detect-aws-credentials | |
- repo: https://github.com/pre-commit/pygrep-hooks | |
rev: v1.9.0 | |
hooks: | |
- id: python-check-mock-methods | |
- id: python-use-type-annotations | |
- repo: https://github.com/hadolint/hadolint | |
rev: master | |
hooks: | |
- id: hadolint-docker | |
- repo: local | |
hooks: | |
- id: lint and format | |
name: Lint and format files | |
entry: poetry run tox -e lint | |
language: system | |
- id: compliance and quality | |
name: Run for compliance and quality checks | |
entry: poetry run tox -e compliance | |
language: system | |
- id: tests | |
name: Run tests | |
entry: poetry run pytest | |
language: system | |
- repo: https://github.com/commitizen-tools/commitizen | |
rev: v2.20.0 | |
hooks: | |
- id: commitizen | |
stages: [commit-msg] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment