Skip to content

Commit 6e53aea

Browse files
[pre-commit.ci] pre-commit autoupdate (#3479)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.9.4 → v0.9.6](astral-sh/ruff-pre-commit@v0.9.4...v0.9.6) - [github.com/rbubley/mirrors-prettier: v3.4.2 → v3.5.0](rbubley/mirrors-prettier@v3.4.2...v3.5.0) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix CI Signed-off-by: Bernát Gábor <[email protected]> --------- Signed-off-by: Bernát Gábor <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Bernát Gábor <[email protected]>
1 parent b588b69 commit 6e53aea

File tree

8 files changed

+48
-31
lines changed

8 files changed

+48
-31
lines changed

.pre-commit-config.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ repos:
1313
rev: v2.4.1
1414
hooks:
1515
- id: codespell
16-
additional_dependencies: ["tomli>=2.1"]
16+
additional_dependencies: ["tomli>=2.2.1"]
1717
- repo: https://github.com/tox-dev/pyproject-fmt
1818
rev: "v2.5.0"
1919
hooks:
@@ -23,7 +23,7 @@ repos:
2323
hooks:
2424
- id: validate-pyproject
2525
- repo: https://github.com/astral-sh/ruff-pre-commit
26-
rev: "v0.9.4"
26+
rev: "v0.9.6"
2727
hooks:
2828
- id: ruff-format
2929
- id: ruff
@@ -32,13 +32,13 @@ repos:
3232
rev: 1.19.1
3333
hooks:
3434
- id: blacken-docs
35-
additional_dependencies: [black==24.10]
35+
additional_dependencies: [black==25.1]
3636
- repo: https://github.com/pre-commit/pygrep-hooks
3737
rev: v1.10.0
3838
hooks:
3939
- id: rst-backticks
4040
- repo: https://github.com/rbubley/mirrors-prettier
41-
rev: "v3.4.2"
41+
rev: "v3.5.0"
4242
hooks:
4343
- id: prettier
4444
- repo: local

pyproject.toml

+18-18
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.26.3",
5+
"hatchling>=1.27",
66
]
77

88
[project]
@@ -50,21 +50,21 @@ dynamic = [
5050
"version",
5151
]
5252
dependencies = [
53-
"cachetools>=5.5",
53+
"cachetools>=5.5.1",
5454
"chardet>=5.2",
5555
"colorama>=0.4.6",
5656
"filelock>=3.16.1",
5757
"packaging>=24.2",
5858
"platformdirs>=4.3.6",
5959
"pluggy>=1.5",
6060
"pyproject-api>=1.8",
61-
"tomli>=2.1; python_version<'3.11'",
61+
"tomli>=2.2.1; python_version<'3.11'",
6262
"typing-extensions>=4.12.2; python_version<'3.11'",
63-
"virtualenv>=20.27.1",
63+
"virtualenv>=20.29.1",
6464
]
6565
optional-dependencies.test = [
6666
"devpi-process>=1.0.2",
67-
"pytest>=8.3.3",
67+
"pytest>=8.3.4",
6868
"pytest-mock>=3.14",
6969
]
7070
urls.Documentation = "https://tox.wiki"
@@ -89,29 +89,29 @@ test = [
8989
"distlib>=0.3.9",
9090
"flaky>=3.8.1",
9191
"hatch-vcs>=0.4",
92-
"hatchling>=1.26.3",
93-
"psutil>=6.1",
94-
"pytest>=8.3.3",
92+
"hatchling>=1.27",
93+
"psutil>=6.1.1",
94+
"pytest>=8.3.4",
9595
"pytest-cov>=5",
9696
"pytest-mock>=3.14",
9797
"pytest-xdist>=3.6.1",
9898
"re-assert>=1.1",
99-
"setuptools>=75.1; python_version<='3.8'",
100-
"setuptools>=75.6; python_version>'3.8'",
99+
"setuptools>=75.3; python_version<='3.8'",
100+
"setuptools>=75.8; python_version>'3.8'",
101101
"time-machine>=2.15; implementation_name!='pypy'",
102-
"wheel>=0.45",
102+
"wheel>=0.45.1",
103103
]
104104
type = [
105-
"mypy==1.13",
105+
"mypy==1.15",
106106
"types-cachetools>=5.5.0.20240820",
107107
"types-chardet>=5.0.4.6",
108108
{ include-group = "test" },
109109
]
110110
docs = [
111111
"furo>=2024.8.6",
112112
"sphinx>=8.1.3",
113-
"sphinx-argparse-cli>=1.18.2",
114-
"sphinx-autodoc-typehints>=2.5",
113+
"sphinx-argparse-cli>=1.19",
114+
"sphinx-autodoc-typehints>=3.0.1",
115115
"sphinx-copybutton>=0.5.2",
116116
"sphinx-inline-tabs>=2023.4.21",
117117
"sphinxcontrib-towncrier>=0.2.1a0",
@@ -121,12 +121,12 @@ fix = [
121121
"pre-commit-uv>=4.1.4",
122122
]
123123
pkg-meta = [
124-
"check-wheel-contents>=0.6",
125-
"twine>=5.1.1",
126-
"uv>=0.5.3",
124+
"check-wheel-contents>=0.6.1",
125+
"twine>=6.1",
126+
"uv>=0.5.29",
127127
]
128128
release = [
129-
"gitpython>=3.1.43",
129+
"gitpython>=3.1.44",
130130
"packaging>=24.2",
131131
"towncrier>=24.8",
132132
]

src/tox/config/cli/parser.py

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""Customize argparse logic for tox (also contains the base options).""" # noqa: A005
1+
"""Customize argparse logic for tox (also contains the base options)."""
22

33
from __future__ import annotations
44

@@ -20,6 +20,11 @@
2020
from .env_var import get_env_var
2121
from .ini import IniConfig
2222

23+
if sys.version_info >= (3, 11): # pragma: >=3.11 cover
24+
from typing import Self
25+
else: # pragma: <3.11 cover
26+
from typing_extensions import Self
27+
2328
if TYPE_CHECKING:
2429
from tox.session.state import State
2530

@@ -287,11 +292,11 @@ def add_argument(self, *args: str, of_type: type[Any] | None = None, **kwargs: A
287292
return result
288293

289294
@classmethod
290-
def base(cls: type[ToxParserT]) -> ToxParserT:
295+
def base(cls) -> Self:
291296
return cls(add_help=False, root=True)
292297

293298
@classmethod
294-
def core(cls: type[ToxParserT]) -> ToxParserT:
299+
def core(cls) -> Self:
295300
return cls(
296301
prog=NAME,
297302
formatter_class=HelpFormatter,

src/tox/config/types.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from __future__ import annotations # noqa: A005
1+
from __future__ import annotations
22

33
from collections import OrderedDict
44
from typing import Iterator, Sequence

src/tox/report.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def stderr(self) -> TextIOWrapper:
140140
""":return: the current standard error"""
141141
return self._local.out_err[1]
142142

143-
@property # type: ignore[override]
143+
@property
144144
def stream(self) -> IO[str]:
145145
""":return: the current stream to write to (alias for the current standard output)"""
146146
return self.stdout

src/tox/tox_env/python/pip/req/args.py

+9-2
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,20 @@
33
import bisect
44
import re
55
from argparse import Action, ArgumentParser, ArgumentTypeError, Namespace
6-
from typing import IO, Any, NoReturn, Sequence
6+
from typing import Any, NoReturn, Protocol, Sequence, TypeVar
77

88
from tox.tox_env.python.pip.req.util import handle_binary_option
99

10+
_T_contra = TypeVar("_T_contra", contravariant=True)
11+
12+
13+
# stable
14+
class _SupportsWrite(Protocol[_T_contra]):
15+
def write(self, s: _T_contra, /) -> object: ...
16+
1017

1118
class _OurArgumentParser(ArgumentParser):
12-
def print_usage(self, file: IO[str] | None = None) -> None:
19+
def print_usage(self, file: _SupportsWrite[str] | None = None) -> None:
1320
""" """
1421

1522
def exit(self, status: int = 0, message: str | None = None) -> NoReturn: # noqa: ARG002, PLR6301

src/tox/util/spinner.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212

1313
from colorama import Fore
1414

15+
if sys.version_info >= (3, 11): # pragma: >=3.11 cover
16+
from typing import Self
17+
else: # pragma: <3.11 cover
18+
from typing_extensions import Self
19+
1520
if TYPE_CHECKING:
1621
from types import TracebackType
1722
from typing import Any, ClassVar
@@ -104,7 +109,7 @@ def frame(self) -> str:
104109
text_frame = textwrap.shorten(text_frame, width=self.max_width - 1, placeholder="...")
105110
return f"{frame} {text_frame}"
106111

107-
def __enter__(self: T) -> T:
112+
def __enter__(self) -> Self:
108113
if self.enabled:
109114
self.disable_cursor()
110115
self.render_frame()

tox.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
requires = ["tox>=4.23.2"]
1+
requires = ["tox>=4.24.1"]
22
env_list = ["fix", "3.13", "3.12", "3.11", "3.10", "3.9", "3.8", "cov", "type", "docs", "pkg_meta"]
33
skip_missing_interpreters = true
44

0 commit comments

Comments
 (0)