| 1 |
ci: |
| 2 |
skip: [pylint] |
| 3 |
|
| 4 |
repos: |
| 5 |
- repo: https://github.com/pre-commit/pre-commit-hooks |
| 6 |
rev: v6.0.0 |
| 7 |
hooks: |
| 8 |
- id: trailing-whitespace |
| 9 |
exclude: .github/|tests/testdata |
| 10 |
- id: end-of-file-fixer |
| 11 |
exclude: tests/testdata |
| 12 |
- repo: https://github.com/astral-sh/ruff-pre-commit |
| 13 |
rev: "v0.16.0" |
| 14 |
hooks: |
| 15 |
- id: ruff-check |
| 16 |
args: ["--fix"] |
| 17 |
- repo: https://github.com/Pierre-Sassoulas/copyright_notice_precommit |
| 18 |
rev: 0.1.2 |
| 19 |
hooks: |
| 20 |
- id: copyright-notice |
| 21 |
args: ["--notice=script/copyright.txt", "--enforce-all", "--autofix"] |
| 22 |
exclude: tests/testdata|setup.py |
| 23 |
types: [python] |
| 24 |
- repo: https://github.com/asottile/pyupgrade |
| 25 |
rev: v3.21.2 |
| 26 |
hooks: |
| 27 |
- id: pyupgrade |
| 28 |
exclude: tests/testdata |
| 29 |
args: [--py310-plus] |
| 30 |
- repo: https://github.com/Pierre-Sassoulas/black-disable-checker/ |
| 31 |
rev: v1.1.3 |
| 32 |
hooks: |
| 33 |
- id: black-disable-checker |
| 34 |
exclude: tests/test_nodes_lineno.py |
| 35 |
- repo: https://github.com/psf/black-pre-commit-mirror |
| 36 |
rev: 26.5.1 |
| 37 |
hooks: |
| 38 |
- id: black |
| 39 |
args: [--safe, --quiet] |
| 40 |
exclude: tests/testdata |
| 41 |
- repo: local |
| 42 |
hooks: |
| 43 |
- id: pylint |
| 44 |
name: pylint |
| 45 |
entry: pylint |
| 46 |
language: system |
| 47 |
types: [python] |
| 48 |
args: [ |
| 49 |
"-rn", |
| 50 |
"-sn", |
| 51 |
"--rcfile=pylintrc", |
| 52 |
# "--load-plugins=pylint.extensions.docparams", We're not ready for that |
| 53 |
] |
| 54 |
# We define an additional manual step to allow running pylint |
| 55 |
# with the proper output for CI. |
| 56 |
- id: pylint |
| 57 |
alias: pylint-ci |
| 58 |
name: pylint |
| 59 |
entry: pylint |
| 60 |
language: system |
| 61 |
types: [python] |
| 62 |
args: [ |
| 63 |
"-rn", |
| 64 |
"-sn", |
| 65 |
"--rcfile=pylintrc", |
| 66 |
"--output-format=github", |
| 67 |
# "--load-plugins=pylint.extensions.docparams", We're not ready for that |
| 68 |
] |
| 69 |
stages: [manual] |
| 70 |
- repo: https://github.com/pre-commit/mirrors-mypy |
| 71 |
rev: v2.3.0 |
| 72 |
hooks: |
| 73 |
- id: mypy |
| 74 |
language: python |
| 75 |
pass_filenames: false |
| 76 |
require_serial: true |
| 77 |
additional_dependencies: ["types-typed-ast"] |
| 78 |
- repo: https://github.com/rbubley/mirrors-prettier |
| 79 |
rev: v3.9.6 |
| 80 |
hooks: |
| 81 |
- id: prettier |
| 82 |
args: [--prose-wrap=always, --print-width=88] |
| 83 |
- repo: https://github.com/pytest-dev/pyproject-fmt |
| 84 |
rev: "v2.12.1" |
| 85 |
hooks: |
| 86 |
- id: pyproject-fmt |