Skip to content

Commit 1d60611

Browse files
authored
Modernise pyproject.toml (#369)
1 parent 6e5b13f commit 1d60611

5 files changed

Lines changed: 44 additions & 47 deletions

File tree

‎.pre-commit-config.yaml‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,45 +14,45 @@ repos:
1414
- id: trailing-whitespace
1515

1616
- repo: https://github.com/astral-sh/ruff-pre-commit
17-
rev: v0.14.10
17+
rev: v0.17.6
1818
hooks:
1919
- id: ruff-check
2020
args: [--fix]
2121
- id: ruff-format
2222

2323
- repo: https://github.com/python-jsonschema/check-jsonschema
24-
rev: 0.36.0
24+
rev: 0.40.0
2525
hooks:
2626
- id: check-dependabot
2727
- id: check-github-workflows
2828

2929
- repo: https://github.com/rhysd/actionlint
30-
rev: v1.7.10
30+
rev: v1.7.12
3131
hooks:
3232
- id: actionlint
3333

34-
- repo: https://github.com/woodruffw/zizmor-pre-commit
35-
rev: v1.19.0
34+
- repo: https://github.com/zizmorcore/zizmor-pre-commit
35+
rev: v1.33.1
3636
hooks:
3737
- id: zizmor
3838

3939
- repo: https://github.com/tox-dev/pyproject-fmt
40-
rev: v2.11.1
40+
rev: v2.31.4
4141
hooks:
4242
- id: pyproject-fmt
4343

4444
- repo: https://github.com/abravalheri/validate-pyproject
45-
rev: v0.24.1
45+
rev: v0.27
4646
hooks:
4747
- id: validate-pyproject
4848

4949
- repo: https://github.com/tox-dev/tox-ini-fmt
50-
rev: 1.7.1
50+
rev: 1.10.3
5151
hooks:
5252
- id: tox-ini-fmt
5353

5454
- repo: https://github.com/rbubley/mirrors-prettier
55-
rev: v3.7.4
55+
rev: v3.10.1
5656
hooks:
5757
- id: prettier
5858
files: templates/switchers.js

‎.ruff.toml‎

Lines changed: 0 additions & 34 deletions
This file was deleted.

‎build_docs.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373

7474
TYPE_CHECKING = False
7575
if TYPE_CHECKING:
76-
from collections.abc import Collection, Iterator, Sequence, Set
76+
from collections.abc import Collection, Generator, Iterator, Sequence, Set
7777
from typing import Literal
7878

7979
try:
@@ -559,7 +559,7 @@ def edit(file: Path):
559559
@contextmanager
560560
def wait_for_lock(
561561
path: Path, timeout: float = 600, poll_interval: float = 10
562-
) -> Iterator[None]:
562+
) -> Generator[None]:
563563
"""Context manager to hold *path* as a lock file, waiting up to *timeout* seconds for it."""
564564
deadline = perf_counter() + timeout
565565
while True:

‎pyproject.toml‎

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,34 @@
1-
[tool.pytest.ini_options]
1+
[tool.ruff]
2+
target-version = "py313" # Pin Ruff to Python 3.13
3+
line-length = 88
4+
output-format = "full"
5+
format.preview = true
6+
format.docstring-code-format = true
7+
lint.select = [
8+
"B", # flake8-bugbear
9+
"C4", # flake8-comprehensions
10+
"E", # pycodestyle
11+
"F", # pyflakes
12+
"FA", # flake8-future-annotations
13+
"FLY", # flynt
14+
"G", # flake8-logging-format
15+
"I", # isort
16+
"N", # pep8-naming
17+
"PERF", # perflint
18+
"PGH", # pygrep-hooks
19+
"PT", # flake8-pytest-style
20+
"TC", # flake8-type-checking
21+
"UP", # pyupgrade
22+
"W", # pycodestyle
23+
]
24+
lint.ignore = [
25+
"E501", # Ignore line length errors (we use auto-formatting)
26+
]
27+
lint.flake8-type-checking.exempt-modules = []
28+
lint.flake8-type-checking.strict = true
29+
lint.preview = true
30+
31+
[tool.pytest]
32+
minversion = "9.0"
233
pythonpath = [ "." ]
334
testpaths = [ "tests" ]

‎tox.ini‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ wheel_build_env = .pkg
1212
skip_install = true
1313
deps =
1414
-r requirements.txt
15-
pytest
15+
pytest>=9
1616
pytest-cov
1717
pass_env =
1818
FORCE_COLOR

0 commit comments

Comments
 (0)