Skip to content

Commit d7ce800

Browse files
[pre-commit.ci] pre-commit autoupdate (#3051)
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 af66165 commit d7ce800

File tree

20 files changed

+43
-43
lines changed

20 files changed

+43
-43
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ repos:
1414
- id: tox-ini-fmt
1515
args: ["-p", "fix"]
1616
- repo: https://github.com/tox-dev/pyproject-fmt
17-
rev: "0.12.0"
17+
rev: "0.12.1"
1818
hooks:
1919
- id: pyproject-fmt
20-
additional_dependencies: ["tox>=4.6.1"]
20+
additional_dependencies: ["tox>=4.6.3"]
2121
- repo: https://github.com/pre-commit/mirrors-prettier
2222
rev: "v3.0.0-alpha.9-for-vscode"
2323
hooks:
@@ -29,7 +29,7 @@ repos:
2929
- id: blacken-docs
3030
additional_dependencies: [black==23.3]
3131
- repo: https://github.com/astral-sh/ruff-pre-commit
32-
rev: "v0.0.272"
32+
rev: "v0.0.275"
3333
hooks:
3434
- id: ruff
3535
args: [--fix, --exit-non-zero-on-fix]

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ and `devpi <https://www.devpi.net>`_).
2222
:target: https://pypistats.org/packages/tox
2323
:alt: PyPI - Downloads
2424
.. image:: https://img.shields.io/pypi/l/tox?style=flat-square
25-
:target: https://opensource.org/licenses/MIT
25+
:target: https://opensource.org/license/mit/
2626
:alt: PyPI - License
2727
.. image:: https://img.shields.io/github/issues/tox-dev/tox?style=flat-square
2828
:target: https://github.com/tox-dev/tox/issues

docs/tox_conf.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from __future__ import annotations
22

3-
from typing import TYPE_CHECKING, cast
3+
from typing import TYPE_CHECKING, Any, ClassVar, cast
44

55
from docutils.nodes import Element, Node, Text, container, fully_normalize_name, literal, paragraph, reference, strong
66
from docutils.parsers.rst.directives import flag, unchanged, unchanged_required
@@ -11,6 +11,8 @@
1111
from sphinx.util.logging import getLogger
1212

1313
if TYPE_CHECKING:
14+
from typing import Final
15+
1416
from docutils.parsers.rst.states import RSTState, RSTStateMachine
1517

1618
LOGGER = getLogger(__name__)
@@ -19,7 +21,7 @@
1921
class ToxConfig(SphinxDirective):
2022
name = "conf"
2123
has_content = True
22-
option_spec = {
24+
option_spec: Final[ClassVar[dict[str, Any]]] = {
2325
"keys": unchanged_required,
2426
"version_added": unchanged,
2527
"version_changed": unchanged,

pyproject.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ dependencies = [
5252
"chardet>=5.1",
5353
"colorama>=0.4.6",
5454
"filelock>=3.12.2",
55-
'importlib-metadata>=6.6; python_version < "3.8"',
55+
'importlib-metadata>=6.7; python_version < "3.8"',
5656
"packaging>=23.1",
57-
"platformdirs>=3.5.3",
58-
"pluggy>=1",
57+
"platformdirs>=3.8",
58+
"pluggy>=1.2",
5959
"pyproject-api>=1.5.2",
6060
'tomli>=2.0.1; python_version < "3.11"',
6161
'typing-extensions>=4.6.3; python_version < "3.8"',
@@ -65,7 +65,7 @@ optional-dependencies.docs = [
6565
"furo>=2023.5.20",
6666
"sphinx>=7.0.1",
6767
"sphinx-argparse-cli>=1.11.1",
68-
"sphinx-autodoc-typehints!=1.23.4,>=1.23.2",
68+
"sphinx-autodoc-typehints!=1.23.4,>=1.23.3",
6969
"sphinx-copybutton>=0.5.2",
7070
"sphinx-inline-tabs>=2023.4.21",
7171
"sphinxcontrib-towncrier>=0.2.1a0",
@@ -82,7 +82,7 @@ optional-dependencies.testing = [
8282
"hatch-vcs>=0.3",
8383
"hatchling>=1.17.1",
8484
"psutil>=5.9.5",
85-
"pytest>=7.3.2",
85+
"pytest>=7.4",
8686
"pytest-cov>=4.1",
8787
"pytest-mock>=3.11.1",
8888
"pytest-xdist>=3.3.1",

src/tox/config/cli/ini.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import os
66
from configparser import ConfigParser
77
from pathlib import Path
8-
from typing import Any
8+
from typing import Any, ClassVar
99

1010
from platformdirs import user_config_dir
1111

@@ -18,7 +18,7 @@
1818

1919
class IniConfig:
2020
TOX_CONFIG_FILE_ENV_VAR = "TOX_USER_CONFIG_FILE"
21-
STATE = {None: "failed to parse", True: "active", False: "missing"}
21+
STATE: ClassVar[dict[bool | None, str]] = {None: "failed to parse", True: "active", False: "missing"}
2222

2323
def __init__(self) -> None:
2424
config_file = os.environ.get(self.TOX_CONFIG_FILE_ENV_VAR, None)

src/tox/config/loader/ini/replace.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,8 +259,7 @@ def replace_reference( # noqa: PLR0912, C901
259259
exception = exc
260260
else:
261261
as_str, _ = stringify(value)
262-
as_str = as_str.replace("#", r"\#") # escape comment characters as these will be stripped
263-
return as_str
262+
return as_str.replace("#", r"\#") # escape comment characters as these will be stripped
264263
except Exception as exc: # noqa: BLE001
265264
exception = exc
266265
if exception is not None:

src/tox/config/loader/section.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def __repr__(self) -> str:
5252

5353
def __eq__(self, other: Any) -> bool:
5454
return isinstance(other, self.__class__) and (self._prefix, self._name) == (
55-
other._prefix, # noqa: SLF001
55+
other._prefix,
5656
other.name,
5757
)
5858

src/tox/config/loader/str_convert.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,14 @@
55
import sys
66
from itertools import chain
77
from pathlib import Path
8-
from typing import Any, Iterator
8+
from typing import TYPE_CHECKING, Any, Iterator
99

1010
from tox.config.loader.convert import Convert
1111
from tox.config.types import Command, EnvList
1212

13+
if TYPE_CHECKING:
14+
from typing import Final
15+
1316

1417
class StrConvert(Convert[str]):
1518
"""A class converting string values to tox types."""
@@ -111,8 +114,8 @@ def to_env_list(value: str) -> EnvList:
111114
elements = list(chain.from_iterable(extend_factors(expr) for expr in value.split("\n")))
112115
return EnvList(elements)
113116

114-
TRUTHFUL_VALUES = {"true", "1", "yes", "on"}
115-
FALSE_VALUES = {"false", "0", "no", "off", ""}
117+
TRUTHFUL_VALUES: Final[set[str]] = {"true", "1", "yes", "on"}
118+
FALSE_VALUES: Final[set[str]] = {"false", "0", "no", "off", ""}
116119
VALID_BOOL = sorted(TRUTHFUL_VALUES | FALSE_VALUES)
117120

118121
@staticmethod

src/tox/config/of_type.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def __init__( # noqa: PLR0913
7171
of_type: type[T],
7272
default: Callable[[Config, str | None], T] | T,
7373
post_process: Callable[[T], T] | None = None,
74-
factory: Factory[T] = None,
74+
factory: Factory[T] | None = None,
7575
) -> None:
7676
super().__init__(keys, desc)
7777
self.of_type = of_type

src/tox/config/sets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def add_config( # noqa: PLR0913
4747
default: Callable[[Config, str | None], V] | V,
4848
desc: str,
4949
post_process: Callable[[V], V] | None = None,
50-
factory: Factory[Any] = None,
50+
factory: Factory[Any] | None = None,
5151
) -> ConfigDynamicDefinition[V]:
5252
"""
5353
Add configuration value.

0 commit comments

Comments
 (0)