Add pre commit

This commit is contained in:
2023-02-28 22:45:14 +01:00
parent 0cb91e268d
commit ce1d881c84

View File

@@ -1,23 +1,17 @@
# See https://pre-commit.com for more information # See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks # See https://pre-commit.com/hooks.html for more hooks
repos: repos:
- repo: https://github.com/pre-commit/pre-commit-hooks - repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0 rev: v3.2.0
hooks: hooks:
- id: trailing-whitespace - id: trailing-whitespace
- id: end-of-file-fixer - id: end-of-file-fixer
- id: check-yaml - id: check-yaml
- id: check-toml - id: check-added-large-files
- id: check-added-large-files - repo: https://github.com/python-poetry/poetry
- repo: https://github.com/psf/black rev: 1.4.0 # add version here
rev: 22.3.0 hooks:
hooks: - id: poetry-check
- id: black - id: poetry-lock
language_version: python3.9 - id: poetry-export
- repo: https://github.com/python-poetry/poetry args: ["-f", "requirements.txt", "-o", "requirements.txt"]
rev: 1.2.0b2
hooks:
- id: poetry-check
- id: poetry-lock
- id: poetry-export
args: ["-f", "requirements.txt", "-o", "requirements.txt"]