diff options
Diffstat (limited to '.pre-commit-config.yaml')
-rw-r--r-- | .pre-commit-config.yaml | 49 |
1 files changed, 32 insertions, 17 deletions
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b4f4dc767..6b20db830 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,16 +16,16 @@ repos: doc/data/messages/m/missing-final-newline/bad.py| )$ - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: "v0.0.254" + rev: "v0.0.263" hooks: - id: ruff args: ["--fix"] exclude: &fixtures tests(/\w*)*/functional/|tests/input|doc/data/messages|tests(/\w*)*data/ - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: "v0.0.254" + rev: "v0.0.263" hooks: - id: ruff - name: line-length-doc + name: ruff-doc files: doc/data/messages args: ["--config", "doc/data/ruff.toml"] - repo: https://github.com/Pierre-Sassoulas/copyright_notice_precommit @@ -36,22 +36,43 @@ repos: exclude: tests(/\w*)*/functional/|tests/input|doc/data/messages|examples/|setup.py|tests(/\w*)*data/ types: [python] - repo: https://github.com/asottile/pyupgrade - rev: v3.3.1 + rev: v3.3.2 hooks: - id: pyupgrade - args: [--py37-plus] + args: [--py38-plus] exclude: *fixtures - repo: https://github.com/PyCQA/isort rev: 5.12.0 hooks: - id: isort - exclude: doc/data/messages/(r/reimported|w/wrong-import-order|u/ungrouped-imports|m/misplaced-future|m/multiple-imports)/bad.py + exclude: doc/data/messages/ - repo: https://github.com/psf/black - rev: 23.1.0 + rev: 23.3.0 hooks: - id: black args: [--safe, --quiet] exclude: *fixtures + - id: black + name: black-doc + args: [--safe, --quiet] + files: doc/data/messages/ + exclude: | + (?x)^( + doc/data/messages/b/bad-indentation/bad.py| + doc/data/messages/i/inconsistent-quotes/bad.py| + doc/data/messages/i/invalid-format-index/bad.py| + doc/data/messages/l/line-too-long/bad.py| + doc/data/messages/m/missing-final-newline/bad.py| + doc/data/messages/m/multiple-statements/bad.py| + doc/data/messages/r/redundant-u-string-prefix/bad.py| + doc/data/messages/s/superfluous-parens/bad.py| + doc/data/messages/s/syntax-error/bad.py| + doc/data/messages/t/too-many-ancestors/bad.py| + doc/data/messages/t/trailing-comma-tuple/bad.py| + doc/data/messages/t/trailing-newlines/bad.py| + doc/data/messages/t/trailing-whitespace/bad.py| + doc/data/messages/u/unnecessary-semicolon/bad.py + )$ - repo: https://github.com/Pierre-Sassoulas/black-disable-checker rev: v1.1.3 hooks: @@ -76,12 +97,6 @@ repos: args: ["-rn", "-sn", "--rcfile=pylintrc", "--fail-on=I", "--spelling-dict=en"] exclude: tests(/\w*)*/functional/|tests/input|tests(/\w*)*data/|doc/ stages: [manual] - - id: fix-documentation - name: Fix documentation - entry: python3 -m script.fix_documentation - language: system - types: [text] - files: ^(doc/whatsnew/\d+\.\d+\.rst) - id: check-newsfragments name: Check newsfragments entry: python3 -m script.check_newsfragments @@ -90,14 +105,14 @@ repos: files: ^(doc/whatsnew/fragments) exclude: doc/whatsnew/fragments/_.*.rst - repo: https://github.com/rstcheck/rstcheck - rev: "v6.1.1" + rev: "v6.1.2" hooks: - id: rstcheck args: ["--report-level=warning"] files: ^(doc/(.*/)*.*\.rst) additional_dependencies: [Sphinx==5.0.1] - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.0.1 + rev: v1.2.0 hooks: - id: mypy name: mypy @@ -116,7 +131,7 @@ repos: ] exclude: tests(/\w*)*/functional/|tests/input|tests(/.*)+/conftest.py|doc/data/messages|tests(/\w*)*data/ - repo: https://github.com/pre-commit/mirrors-prettier - rev: v3.0.0-alpha.6 + rev: v3.0.0-alpha.9-for-vscode hooks: - id: prettier args: [--prose-wrap=always, --print-width=88] @@ -143,7 +158,7 @@ repos: setup.cfg )$ - repo: https://github.com/PyCQA/bandit - rev: 1.7.4 + rev: 1.7.5 hooks: - id: bandit args: ["-r", "-lll"] |