|
| 1 | +repos: |
| 2 | + - repo: https://github.com/python-poetry/poetry |
| 3 | + rev: "1.7.0" |
| 4 | + hooks: |
| 5 | + - id: poetry-check |
| 6 | + args: [--directory=backend] |
| 7 | + - id: poetry-lock |
| 8 | + args: [--directory=backend] |
| 9 | + - id: poetry-install |
| 10 | + args: [--directory=backend] |
| 11 | + - repo: https://github.com/pre-commit/pre-commit-hooks |
| 12 | + rev: v4.5.0 |
| 13 | + hooks: |
| 14 | + - id: trailing-whitespace |
| 15 | + - id: end-of-file-fixer |
| 16 | + exclude: ^.*\.egg-info/ |
| 17 | + - id: check-merge-conflict |
| 18 | + - id: check-case-conflict |
| 19 | + - id: check-json |
| 20 | + - id: check-toml |
| 21 | + exclude: tests/fixtures/invalid_lock/poetry\.lock |
| 22 | + - id: check-yaml |
| 23 | + - id: check-ast |
| 24 | + - id: debug-statements |
| 25 | + - id: check-docstring-first |
| 26 | + |
| 27 | + - repo: https://github.com/psf/black |
| 28 | + rev: 23.12.0 |
| 29 | + hooks: |
| 30 | + - id: black |
| 31 | + language_version: python3.9 |
| 32 | + args: |
| 33 | + [ |
| 34 | + --line-length=88, |
| 35 | + --target-version=py311, |
| 36 | + --exclude=\.venv/, |
| 37 | + --exclude=\.nox/, |
| 38 | + --exclude=\.tox/, |
| 39 | + --exclude=\.eggs/, |
| 40 | + --exclude=build/, |
| 41 | + --exclude=dist/, |
| 42 | + --exclude=docs/, |
| 43 | + --exclude=\.mypy_cache/, |
| 44 | + --exclude=\.pytest_cache/, |
| 45 | + --exclude=\.git/, |
| 46 | + --exclude=\.github/, |
| 47 | + --exclude=\.vscode/, |
| 48 | + --exclude=\.pyright/, |
| 49 | + --exclude=\.pylint_cache/, |
| 50 | + --exclude=\.hypothesis/, |
| 51 | + --exclude=\.mypy/, |
| 52 | + --exclude=\.coverage/, |
| 53 | + ] |
| 54 | + |
| 55 | + - repo: https://github.com/pycqa/flake8 |
| 56 | + rev: 6.1.0 |
| 57 | + hooks: |
| 58 | + - id: flake8 |
| 59 | + args: [--max-line-length=88, --ignore=E203] |
| 60 | + |
| 61 | + - repo: https://github.com/myint/autoflake |
| 62 | + rev: v2.2.1 |
| 63 | + hooks: |
| 64 | + - id: autoflake |
| 65 | + args: |
| 66 | + [ |
| 67 | + "--in-place", |
| 68 | + "--remove-all-unused-imports", |
| 69 | + "--remove-unused-variables", |
| 70 | + "--remove-duplicate-keys", |
| 71 | + ".", |
| 72 | + ] |
| 73 | + |
| 74 | + - repo: https://github.com/pycqa/isort |
| 75 | + rev: 5.13.2 |
| 76 | + hooks: |
| 77 | + - id: isort |
| 78 | + args: [--filter-files, --profile=black, --src-path=src, --gitignore] |
| 79 | + |
| 80 | + - repo: https://github.com/pre-commit/mirrors-prettier |
| 81 | + rev: v4.0.0-alpha.6 |
| 82 | + hooks: |
| 83 | + - id: prettier |
| 84 | + additional_dependencies: |
| 85 | + - prettier@2.8.1 |
| 86 | + |
| 87 | + - repo: https://github.com/pre-commit/pre-commit |
| 88 | + rev: v3.6.0 |
| 89 | + hooks: |
| 90 | + - id: validate_manifest |
| 91 | + |
| 92 | + - repo: https://github.com/astral-sh/ruff-pre-commit |
| 93 | + rev: v0.1.8 |
| 94 | + hooks: |
| 95 | + - id: ruff |
| 96 | + |
| 97 | + - repo: local |
| 98 | + hooks: |
| 99 | + - id: export-requirements |
| 100 | + name: Export requeriments.txt |
| 101 | + language: system |
| 102 | + pass_filenames: false |
| 103 | + entry: poetry export --without-hashes -o requirements.txt -f requirements.txt |
| 104 | + files: ^(pyproject\.toml|poetry\.lock)$ |
0 commit comments