|
1 | | -# not necessary as Zac-HD/flake8-trio don't currently run pre-commit as an app |
2 | | -# but keeping it for forks, or in case that changes |
| 1 | +--- |
| 2 | +default_language_version: |
| 3 | + python: python3.11 |
| 4 | +# pyright requires internet connection to run, which the pre-commit ci app doesn't have. |
| 5 | +# Not used in this repo. |
3 | 6 | ci: |
4 | | - skip: [pyright] |
| 7 | + skip: [pyright] |
5 | 8 |
|
6 | 9 | repos: |
7 | | -- repo: https://github.com/Zac-HD/shed |
8 | | - rev: 2023.3.1 |
9 | | - hooks: |
10 | | - - id: shed |
11 | | - args: ['--py39-plus'] |
| 10 | + - repo: https://github.com/psf/black |
| 11 | + rev: 23.1.0 |
| 12 | + hooks: |
| 13 | + - id: black |
12 | 14 |
|
13 | | -- repo: https://github.com/RobertCraigie/pyright-python |
14 | | - rev: v1.1.298 |
15 | | - hooks: |
16 | | - - id: pyright |
17 | | - entry: env PYRIGHT_PYTHON_FORCE_VERSION=latest pyright |
18 | | - args: ['--pythonversion=3.11', '--warnings'] |
19 | | - additional_dependencies: |
| 15 | + - repo: https://github.com/PyCQA/autoflake |
| 16 | + rev: v2.0.1 |
| 17 | + hooks: |
| 18 | + - id: autoflake |
| 19 | + |
| 20 | + - repo: https://github.com/asottile/pyupgrade |
| 21 | + rev: v3.3.1 |
| 22 | + hooks: |
| 23 | + - id: pyupgrade |
| 24 | + args: [--py39-plus] |
| 25 | + |
| 26 | + - repo: https://github.com/pycqa/isort |
| 27 | + rev: 5.12.0 |
| 28 | + hooks: |
| 29 | + - id: isort |
| 30 | + |
| 31 | + - repo: https://github.com/RobertCraigie/pyright-python |
| 32 | + rev: v1.1.298 |
| 33 | + hooks: |
| 34 | + - id: pyright |
| 35 | + entry: env PYRIGHT_PYTHON_FORCE_VERSION=latest pyright |
| 36 | + args: [--pythonversion=3.11, --warnings] |
| 37 | + additional_dependencies: |
20 | 38 | # Required for pyright strict mode |
21 | | - - hypothesis |
22 | | - - hypothesmith |
23 | | - - pytest |
24 | | - - flake8 |
25 | | - - trio |
26 | | - - anyio |
| 39 | + - anyio |
| 40 | + - flake8 |
| 41 | + - hypothesis |
| 42 | + - hypothesmith |
| 43 | + - pytest |
| 44 | + - trio |
27 | 45 |
|
28 | | -- repo: https://github.com/codespell-project/codespell |
29 | | - rev: v2.2.3 |
30 | | - hooks: |
31 | | - - id: codespell |
32 | | - additional_dependencies: |
33 | | - - tomli |
| 46 | + - repo: https://github.com/codespell-project/codespell |
| 47 | + rev: v2.2.4 |
| 48 | + hooks: |
| 49 | + - id: codespell |
| 50 | + additional_dependencies: |
| 51 | + - tomli |
34 | 52 |
|
35 | | -- repo: https://github.com/pre-commit/pre-commit-hooks |
36 | | - rev: v4.4.0 |
37 | | - hooks: |
38 | | - - id: trailing-whitespace |
39 | | - args: ['--markdown-linebreak-ext=md,markdown'] |
40 | | - - id: end-of-file-fixer |
41 | | - - id: fix-encoding-pragma |
42 | | - args: [--remove] |
43 | | - - id: check-yaml |
44 | | - - id: debug-statements |
45 | | - language_version: python3 |
| 53 | + - repo: https://github.com/pre-commit/pre-commit-hooks |
| 54 | + rev: v4.4.0 |
| 55 | + hooks: |
| 56 | + - id: check-merge-conflict |
| 57 | + - id: check-toml |
| 58 | + - id: check-yaml |
| 59 | + - id: debug-statements |
| 60 | + language_version: python3 |
| 61 | + - id: end-of-file-fixer |
| 62 | + - id: fix-encoding-pragma |
| 63 | + args: [--remove] |
| 64 | + - id: trailing-whitespace |
| 65 | + args: ['--markdown-linebreak-ext=md,markdown'] |
46 | 66 |
|
47 | | -- repo: https://github.com/PyCQA/flake8 |
48 | | - rev: 6.0.0 |
49 | | - hooks: |
50 | | - - id: flake8 |
51 | | - types: ["python", "pyi"] |
52 | | - language_version: python3 |
53 | | - additional_dependencies: |
54 | | - - flake8-builtins |
55 | | - - flake8-bugbear |
56 | | - - flake8-comprehensions |
57 | | - - flake8-2020 |
58 | | - - flake8-builtins |
59 | | - - flake8-bugbear |
60 | | - - flake8-comprehensions |
61 | | - - flake8-datetimez |
62 | | - - flake8-docstrings |
63 | | - - flake8-mutable |
64 | | - - flake8-noqa |
65 | | - - flake8-pie |
66 | | - - flake8-pytest-style |
67 | | - - flake8-return |
68 | | - - flake8-simplify |
69 | | - - flake8-type-checking |
70 | | - - flake8-pyi |
| 67 | + - repo: https://github.com/PyCQA/flake8 |
| 68 | + rev: 6.0.0 |
| 69 | + hooks: |
| 70 | + - id: flake8 |
| 71 | + types_or: [python, pyi] |
| 72 | + language_version: python3 |
| 73 | + additional_dependencies: |
| 74 | + - flake8-2020 |
| 75 | + - flake8-bugbear |
| 76 | + - flake8-builtins |
| 77 | + - flake8-comprehensions |
| 78 | + - flake8-datetimez |
| 79 | + - flake8-docstrings |
| 80 | + - flake8-mutable |
| 81 | + - flake8-noqa |
| 82 | + - flake8-pie |
| 83 | + - flake8-pyi |
| 84 | + - flake8-pytest-style |
| 85 | + - flake8-return |
| 86 | + - flake8-simplify |
| 87 | + - flake8-type-checking |
71 | 88 |
|
72 | 89 | # Pinned to flake8 5.0.4 since flake8-eradicate is not updated to work with flake8 6 |
73 | 90 | # https://github.com/wemake-services/flake8-eradicate/pull/271 |
74 | | -- repo: https://github.com/PyCQA/flake8 |
75 | | - rev: 5.0.4 |
76 | | - hooks: |
77 | | - - id: flake8 |
78 | | - args: ["--select=E800"] |
79 | | - language_version: python3 |
80 | | - additional_dependencies: |
81 | | - - flake8-eradicate |
| 91 | + - repo: https://github.com/PyCQA/flake8 |
| 92 | + rev: 5.0.4 |
| 93 | + hooks: |
| 94 | + - id: flake8 |
| 95 | + name: flake8-eradicate |
| 96 | + args: [--select=E800] |
| 97 | + language_version: python3 |
| 98 | + additional_dependencies: |
| 99 | + - flake8-eradicate |
| 100 | + |
| 101 | + - repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt |
| 102 | + rev: 0.2.2 |
| 103 | + hooks: |
| 104 | + - id: yamlfmt |
| 105 | + |
| 106 | + - repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks |
| 107 | + rev: v2.7.0 |
| 108 | + hooks: |
| 109 | + - id: pretty-format-toml |
| 110 | + args: [--autofix] |
0 commit comments