Skip to content

Commit

Permalink
Add new linters and update old linters
Browse files Browse the repository at this point in the history
  • Loading branch information
zhPavel committed Jan 15, 2025
1 parent ec5f344 commit 3aa43c9
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/coverage_external_pr.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Post coverage comment

on:
workflow_run:
workflow_run: # zizmor: ignore[dangerous-triggers]
workflows: ["Run linters and tests"]
types:
- completed
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/lint_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ jobs:

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
persist-credentials: false

- name: Set up Python 3.11
uses: actions/setup-python@v5
Expand Down Expand Up @@ -67,6 +69,8 @@ jobs:

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
persist-credentials: false

- name: Set up Python 3.11
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3
Expand Down Expand Up @@ -117,6 +121,8 @@ jobs:

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
persist-credentials: false

- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16
id: download
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test_all_oses.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ jobs:

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
persist-credentials: false

- name: Set up Python 3.11
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3
Expand Down
27 changes: 25 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ files: |-
|(docs/custom_ext/.*)
|(benchmarks/.*)
|(scripts/.*)
|(.github/.*)
|(.pre-commit-config.yaml)
)$
default_stages:
Expand All @@ -32,8 +34,8 @@ repos:
- id: eradicate
args: ['-e'] # remove default --in-place argument and emit error

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.3
- repo: 'https://github.com/astral-sh/ruff-pre-commit'
rev: v0.9.1
hooks:
- id: ruff
args: [ --fix-only ]
Expand All @@ -42,3 +44,24 @@ repos:
rev: 5.13.2
hooks:
- id: isort

- repo: 'https://github.com/python-jsonschema/check-jsonschema'
rev: 0.31.0
hooks:
- id: check-dependabot
- id: check-github-workflows

- repo: 'https://github.com/rhysd/actionlint'
rev: v1.7.3
hooks:
- id: actionlint

- repo: 'https://github.com/woodruffw/zizmor-pre-commit'
rev: v1.1.1
hooks:
- id: zizmor

- repo: meta
hooks:
- id: check-hooks-apply
- id: check-useless-excludes
4 changes: 2 additions & 2 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ mdurl==0.1.2
# via markdown-it-py
msgspec==0.18.4 ; implementation_name != 'pypy'
# via -r requirements/raw/bench.txt
mypy==1.13.0
mypy==1.14.0
# via -r requirements/raw/lint.txt
mypy-extensions==1.0.0
# via mypy
Expand Down Expand Up @@ -202,7 +202,7 @@ radon==6.0.1
# via -r requirements/raw/lint.txt
requests==2.32.3
# via sphinx
ruff==0.8.3
ruff==0.9.1
# via -r requirements/raw/lint.txt
schematics==2.1.1
# via -r requirements/raw/bench.txt
Expand Down
6 changes: 3 additions & 3 deletions requirements/lint.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ cfgv==3.4.0
# via pre-commit
charset-normalizer==3.4.0
# via requests
colorama==0.4.6 ; python_full_version >= '3.5'
colorama==0.4.6
# via radon
contourpy==1.3.1
# via matplotlib
Expand Down Expand Up @@ -103,7 +103,7 @@ mdurl==0.1.2
# via markdown-it-py
msgspec==0.18.4 ; implementation_name != 'pypy'
# via -r requirements/raw/bench.txt
mypy==1.13.0
mypy==1.14.0
# via -r requirements/raw/lint.txt
mypy-extensions==1.0.0
# via mypy
Expand Down Expand Up @@ -176,7 +176,7 @@ radon==6.0.1
# via -r requirements/raw/lint.txt
requests==2.32.3
# via sphinx
ruff==0.8.3
ruff==0.9.1
# via -r requirements/raw/lint.txt
schematics==2.1.1
# via -r requirements/raw/bench.txt
Expand Down
4 changes: 2 additions & 2 deletions requirements/raw/lint.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

pre-commit==4.0.1

mypy[faster-cache]==1.13.0
mypy[faster-cache]==1.14.0

vulture==2.10

ruff==0.8.3
ruff==0.9.1

radon==6.0.1
dlint==0.14.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ def test_literal(strict_coercion, debug_trail):
["other_type", "value", "expected", "wrong_value"],
[
(
Decimal, Decimal(200.5), "200.5", [1, 2, 3],
Decimal, Decimal("200.5"), "200.5", [1, 2, 3],
),
(
Union[str, Decimal], "some string", "some string", [1, 2, 3],
Expand Down

0 comments on commit 3aa43c9

Please sign in to comment.