|
| 1 | +default_language_version: |
| 2 | + python: python3 |
| 3 | +repos: |
| 4 | + - repo: https://github.com/pre-commit/pre-commit-hooks |
| 5 | + rev: v5.0.0 |
| 6 | + hooks: |
| 7 | + - id: check-added-large-files |
| 8 | + args: ["--maxkb=30000"] |
| 9 | + - id: check-ast |
| 10 | + - id: check-byte-order-marker |
| 11 | + - id: check-builtin-literals |
| 12 | + - id: check-case-conflict |
| 13 | + - id: check-docstring-first |
| 14 | + - id: check-merge-conflict |
| 15 | + - id: check-symlinks |
| 16 | + - id: check-toml |
| 17 | + - id: check-yaml |
| 18 | + - id: debug-statements |
| 19 | + - id: destroyed-symlinks |
| 20 | + - id: end-of-file-fixer |
| 21 | + - id: fix-byte-order-marker |
| 22 | + - id: mixed-line-ending |
| 23 | + - id: file-contents-sorter |
| 24 | + files: "envs/requirements*.txt" |
| 25 | + - id: trailing-whitespace |
| 26 | + - repo: https://github.com/astral-sh/ruff-pre-commit |
| 27 | + rev: v0.11.8 |
| 28 | + hooks: |
| 29 | + # run the linter |
| 30 | + - id: ruff |
| 31 | + args: [--fix] |
| 32 | + # run the formatter |
| 33 | + - id: ruff-format |
| 34 | + - repo: https://github.com/pre-commit/mirrors-mypy |
| 35 | + rev: v1.15.0 |
| 36 | + hooks: # https://github.com/python/mypy/issues/4008#issuecomment-582458665 |
| 37 | + - id: mypy |
| 38 | + name: mypy |
| 39 | + pass_filenames: false |
| 40 | + args: |
| 41 | + [ |
| 42 | + --strict-equality, |
| 43 | + --disallow-untyped-calls, |
| 44 | + --disallow-untyped-defs, |
| 45 | + --disallow-incomplete-defs, |
| 46 | + --disallow-any-generics, |
| 47 | + --check-untyped-defs, |
| 48 | + --disallow-untyped-decorators, |
| 49 | + --warn-redundant-casts, |
| 50 | + --warn-unused-ignores, |
| 51 | + --no-warn-no-return, |
| 52 | + --warn-unreachable, |
| 53 | + ] |
| 54 | + additional_dependencies: ["types-requests"] |
| 55 | + - repo: https://github.com/pre-commit/mirrors-prettier |
| 56 | + rev: v4.0.0-alpha.8 |
| 57 | + hooks: |
| 58 | + - id: prettier |
| 59 | + args: |
| 60 | + - --print-width=120 |
| 61 | + - --prose-wrap=always |
| 62 | + - --tab-width=2 |
| 63 | + - repo: https://github.com/codespell-project/codespell |
| 64 | + rev: v2.4.1 |
| 65 | + hooks: |
| 66 | + - id: codespell |
| 67 | + name: codespell |
| 68 | + description: Checks for common misspellings in text files. |
| 69 | + entry: codespell --ignore-words=.codespell-ignore.txt --skip=**/*.ipynb |
| 70 | + language: python |
| 71 | + types: [text] |
0 commit comments