Skip to content

Commit e732f66

Browse files
[pre-commit.ci] pre-commit autoupdate (#240)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/python-jsonschema/check-jsonschema: 0.30.0 → 0.31.0](python-jsonschema/check-jsonschema@0.30.0...0.31.0) - [github.com/astral-sh/ruff-pre-commit: v0.8.1 → v0.9.2](astral-sh/ruff-pre-commit@v0.8.1...v0.9.2) - [github.com/rbubley/mirrors-prettier: v3.4.1 → v3.4.2](rbubley/mirrors-prettier@v3.4.1...v3.4.2) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net> --------- Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 303bb31 commit e732f66

File tree

9 files changed

+35
-31
lines changed

9 files changed

+35
-31
lines changed

.github/workflows/check.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ jobs:
2424
- "3.11"
2525
- "3.10"
2626
- "3.9"
27-
- "3.8"
2827
- type
2928
- dev
3029
- pkg_meta

.pre-commit-config.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ repos:
55
- id: end-of-file-fixer
66
- id: trailing-whitespace
77
- repo: https://github.com/python-jsonschema/check-jsonschema
8-
rev: 0.30.0
8+
rev: 0.31.0
99
hooks:
1010
- id: check-github-workflows
1111
args: ["--verbose"]
1212
- repo: https://github.com/codespell-project/codespell
1313
rev: v2.3.0
1414
hooks:
1515
- id: codespell
16-
additional_dependencies: ["tomli>=2.0.1"]
16+
additional_dependencies: ["tomli>=2.2.1"]
1717
- repo: https://github.com/tox-dev/tox-ini-fmt
1818
rev: "1.4.1"
1919
hooks:
@@ -24,13 +24,13 @@ repos:
2424
hooks:
2525
- id: pyproject-fmt
2626
- repo: https://github.com/astral-sh/ruff-pre-commit
27-
rev: "v0.8.1"
27+
rev: "v0.9.2"
2828
hooks:
2929
- id: ruff-format
3030
- id: ruff
3131
args: ["--fix", "--unsafe-fixes", "--exit-non-zero-on-fix"]
3232
- repo: https://github.com/rbubley/mirrors-prettier
33-
rev: "v3.4.1"
33+
rev: "v3.4.2"
3434
hooks:
3535
- id: prettier
3636
args: ["--print-width=120", "--prose-wrap=always"]

pyproject.toml

+5-8
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
build-backend = "hatchling.build"
33
requires = [
44
"hatch-vcs>=0.4",
5-
"hatchling>=1.25",
5+
"hatchling>=1.27",
66
]
77

88
[project]
@@ -20,7 +20,7 @@ license = "MIT"
2020
maintainers = [
2121
{ name = "Bernát Gábor", email = "gaborjbernat@gmail.com" },
2222
]
23-
requires-python = ">=3.8"
23+
requires-python = ">=3.9"
2424
classifiers = [
2525
"Development Status :: 5 - Production/Stable",
2626
"Framework :: tox",
@@ -30,7 +30,6 @@ classifiers = [
3030
"Operating System :: Microsoft :: Windows",
3131
"Operating System :: POSIX",
3232
"Programming Language :: Python :: 3 :: Only",
33-
"Programming Language :: Python :: 3.8",
3433
"Programming Language :: Python :: 3.9",
3534
"Programming Language :: Python :: 3.10",
3635
"Programming Language :: Python :: 3.11",
@@ -44,12 +43,12 @@ dynamic = [
4443
"version",
4544
]
4645
dependencies = [
47-
"packaging>=24.1",
46+
"packaging>=24.2",
4847
]
4948
optional-dependencies.testing = [
5049
"covdefaults>=2.3",
51-
"pytest>=8.3.2",
52-
"pytest-cov>=5",
50+
"pytest>=8.3.4",
51+
"pytest-cov>=6",
5352
]
5453
urls.Documentation = "https://tox.wiki"
5554
urls.Homepage = "https://github.com/tox-dev/tox-ini-fmt/blob/main/README.md#tox-ini-fmt"
@@ -71,7 +70,6 @@ build.targets.sdist.include = [
7170
version.source = "vcs"
7271

7372
[tool.ruff]
74-
target-version = "py38"
7573
line-length = 120
7674
format.preview = true
7775
format.docstring-code-line-length = 100
@@ -80,7 +78,6 @@ lint.select = [
8078
"ALL",
8179
]
8280
lint.ignore = [
83-
"ANN101", # Missing type annotation for `self` in method
8481
"COM812", # Conflict with formatter
8582
"CPY", # No copyright statements
8683
"D203", # `one-blank-line-before-class` (D203) and `no-blank-line-before-class` (D211) are incompatible

src/tox_ini_fmt/__main__.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,14 @@
55
import difflib
66
import sys
77
from pathlib import Path
8-
from typing import Iterable, Sequence
8+
from typing import TYPE_CHECKING
99

1010
from tox_ini_fmt.cli import cli_args
1111
from tox_ini_fmt.formatter import format_tox_ini
1212

13+
if TYPE_CHECKING:
14+
from collections.abc import Iterable, Sequence
15+
1316
GREEN = "\u001b[32m"
1417
RED = "\u001b[31m"
1518
RESET = "\u001b[0m"

src/tox_ini_fmt/cli.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
import os
66
from argparse import Action, ArgumentParser, ArgumentTypeError, Namespace
77
from pathlib import Path
8-
from typing import Any, Sequence
8+
from typing import TYPE_CHECKING, Any
9+
10+
if TYPE_CHECKING:
11+
from collections.abc import Sequence
912

1013

1114
class ToxIniFmtNamespace(Namespace):

src/tox_ini_fmt/formatter/test_env.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
from __future__ import annotations
44

55
from functools import partial
6-
from typing import TYPE_CHECKING, Callable, Mapping
6+
from typing import TYPE_CHECKING, Callable
77

88
from .util import collect_multi_line, fix_and_reorder, fmt_list, to_boolean, to_list_of_env_values, to_py_dependencies
99

1010
if TYPE_CHECKING:
11+
from collections.abc import Mapping
1112
from configparser import ConfigParser
1213

1314

src/tox_ini_fmt/formatter/tox_section.py

+7-6
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from __future__ import annotations
44

55
from functools import partial
6-
from typing import TYPE_CHECKING, Callable, Mapping
6+
from typing import TYPE_CHECKING, Callable
77

88
from packaging.requirements import Requirement
99
from packaging.version import Version
@@ -12,6 +12,7 @@
1212
from .util import collect_multi_line, fix_and_reorder, to_boolean, to_list_of_env_values, to_py_dependencies
1313

1414
if TYPE_CHECKING:
15+
from collections.abc import Mapping
1516
from configparser import ConfigParser, SectionProxy
1617

1718

@@ -63,15 +64,15 @@ def _handle_min_version(tox: SectionProxy) -> None:
6364
normalize=lambda groups: {k: requires(v) for k, v in groups.items()},
6465
)[0]
6566
]
66-
for _at, entry in enumerate(tox_requires):
67+
for at, entry in enumerate(tox_requires): # noqa: B007 # false positive
6768
if entry.name == "tox":
6869
break
6970
else:
70-
_at = -1
71-
if _at == -1:
71+
at = -1
72+
if at == -1:
7273
tox_requires.append(Requirement(f"tox>={min_version}"))
7374
else:
74-
specifiers = list(tox_requires[_at].specifier)
75+
specifiers = list(tox_requires[at].specifier)
7576
if len(specifiers) == 0 or Version(specifiers[0].version) < Version(min_version):
76-
tox_requires[_at] = Requirement(f"tox>={min_version}")
77+
tox_requires[at] = Requirement(f"tox>={min_version}")
7778
tox["requires"] = "\n".join(str(i) for i in tox_requires)

src/tox_ini_fmt/formatter/util.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@
66
import re
77
from collections import defaultdict
88
from functools import partial
9-
from typing import TYPE_CHECKING, Callable, Mapping, TypedDict, cast
9+
from typing import TYPE_CHECKING, Callable, TypedDict, cast
1010

1111
from .requires import requires
1212

1313
if TYPE_CHECKING:
14+
from collections.abc import Mapping
1415
from configparser import ConfigParser
1516

1617

tox.ini

+7-8
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
[tox]
22
requires =
3-
tox>=4.2
4-
tox-uv>=1.11.3
3+
tox>=4.23.2
4+
tox-uv>=1.19.1
55
env_list =
66
fix
77
3.13
88
3.12
99
3.11
1010
3.10
1111
3.9
12-
3.8
1312
type
1413
pkg_meta
1514
skip_missing_interpreters = true
@@ -37,14 +36,14 @@ commands =
3736
description = format the code base to adhere to our styles, and complain about what we cannot do automatically
3837
skip_install = true
3938
deps =
40-
pre-commit-uv>=4.1.1
39+
pre-commit-uv>=4.1.4
4140
commands =
4241
pre-commit run --all-files --show-diff-on-failure
4342

4443
[testenv:type]
4544
description = run type check on code base
4645
deps =
47-
mypy==1.11.2
46+
mypy==1.14.1
4847
commands =
4948
mypy src
5049
mypy tests
@@ -53,9 +52,9 @@ commands =
5352
description = check that the long description is valid
5453
skip_install = true
5554
deps =
56-
check-wheel-contents>=0.6
57-
twine>=5.1.1
58-
uv>=0.4.10
55+
check-wheel-contents>=0.6.1
56+
twine>=6.0.1
57+
uv>=0.5.21
5958
commands =
6059
uv build --sdist --wheel --out-dir {env_tmp_dir} .
6160
twine check {env_tmp_dir}{/}*

0 commit comments

Comments
 (0)