Skip to content

Commit 57783e3

Browse files
[pre-commit.ci] pre-commit autoupdate (#3226)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent c024fe2 commit 57783e3

File tree

9 files changed

+12
-10
lines changed

9 files changed

+12
-10
lines changed

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ repos:
2525
- id: pyproject-fmt
2626
additional_dependencies: ["tox>=4.12.1"]
2727
- repo: https://github.com/astral-sh/ruff-pre-commit
28-
rev: "v0.2.1"
28+
rev: "v0.2.2"
2929
hooks:
3030
- id: ruff-format
3131
- id: ruff

docs/index.rst

+1-1
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/license/mit/
25+
:target: https://opensource.org/blog/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

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ def _replace_match(self, value: MatchExpression) -> str:
224224
def _replace_ref(env: str | None) -> Pattern[str]:
225225
return re.compile(
226226
rf"""
227-
(\[(?P<full_env>{re.escape(env or '.*')}(:(?P<env>[^]]+))?|(?P<section>[-\w]+))])? # env/section
227+
(\[(?P<full_env>{re.escape(env or ".*")}(:(?P<env>[^]]+))?|(?P<section>[-\w]+))])? # env/section
228228
(?P<key>[-a-zA-Z0-9_]+) # key
229229
(:(?P<default>.*))? # default value
230230
$

src/tox/config/of_type.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ def __call__(
9191
for key, loader in product(self.keys, loaders):
9292
chain_key = f"{loader.section.key}.{key}"
9393
if chain_key in args.chain:
94-
msg = f"circular chain detected {', '.join(args.chain[args.chain.index(chain_key):])}"
94+
values = args.chain[args.chain.index(chain_key) :]
95+
msg = f"circular chain detected {', '.join(values)}"
9596
raise ValueError(msg)
9697
args.chain.append(chain_key)
9798
try:

src/tox/session/cmd/quickstart.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def quickstart(state: State) -> int:
4343
text = f"""
4444
[tox]
4545
env_list =
46-
py{''.join(str(i) for i in sys.version_info[0:2])}
46+
py{"".join(str(i) for i in sys.version_info[0:2])}
4747
minversion = {version}
4848
4949
[testenv]

src/tox/tox_env/python/pip/req_file.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,14 @@ def _normalize_line(line: str) -> str:
8484
None,
8585
)
8686
if arg_match is not None:
87-
line = f"{arg_match} {line[len(arg_match):]}"
87+
values = line[len(arg_match) :]
88+
line = f"{arg_match} {values}"
8889
# escape spaces
8990
escape_match = next((e for e in ONE_ARG_ESCAPE if line.startswith(e) and line[len(e)].isspace()), None)
9091
if escape_match is not None:
9192
# escape not already escaped spaces
9293
escaped = re.sub(r"(?<!\\)(\s)", r"\\\1", line[len(escape_match) + 1 :])
93-
line = f"{line[:len(escape_match)]} {escaped}"
94+
line = f"{line[: len(escape_match)]} {escaped}"
9495
return line
9596

9697
def _parse_requirements(self, opt: Namespace, recurse: bool) -> list[ParsedRequirement]: # noqa: FBT001

tests/session/cmd/test_quickstart.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def test_quickstart_ok(tox_project: ToxProjectCreator) -> None:
2727
text = f"""
2828
[tox]
2929
env_list =
30-
py{''.join(str(i) for i in sys.version_info[0:2])}
30+
py{"".join(str(i) for i in sys.version_info[0:2])}
3131
minversion = {version}
3232
3333
[testenv]

tests/tox_env/python/pip/req/test_file.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ def test_req_path_with_space_escape(tmp_path: Path) -> None:
423423
dep_requirements_file = tmp_path / "a b"
424424
dep_requirements_file.write_text("c")
425425
path = f"-r {dep_requirements_file!s}"
426-
path = f'{path[:-len("a b")]}a\\ b'
426+
path = f'{path[: -len("a b")]}a\\ b'
427427

428428
requirements_file = tmp_path / "req.txt"
429429
requirements_file.write_text(path)

tests/tox_env/test_info.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
def test_info_repr() -> None:
99
at_loc = Path().absolute()
1010
info_object = Info(at_loc)
11-
assert repr(info_object) == f"Info(path={ at_loc / '.tox-info.json' })"
11+
assert repr(info_object) == f"Info(path={at_loc / '.tox-info.json'})"

0 commit comments

Comments
 (0)