From ef00283e6dc1e2b1f3f452b5df79627baa41bd4a Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 16 Dec 2024 16:52:49 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/tox_ini_fmt/formatter/tox_section.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/tox_ini_fmt/formatter/tox_section.py b/src/tox_ini_fmt/formatter/tox_section.py index a1384ea..c7129b7 100644 --- a/src/tox_ini_fmt/formatter/tox_section.py +++ b/src/tox_ini_fmt/formatter/tox_section.py @@ -63,15 +63,15 @@ def _handle_min_version(tox: SectionProxy) -> None: normalize=lambda groups: {k: requires(v) for k, v in groups.items()}, )[0] ] - for _at, entry in enumerate(tox_requires): + for at, entry in enumerate(tox_requires): if entry.name == "tox": break else: - _at = -1 - if _at == -1: + at = -1 + if at == -1: tox_requires.append(Requirement(f"tox>={min_version}")) else: - specifiers = list(tox_requires[_at].specifier) + specifiers = list(tox_requires[at].specifier) if len(specifiers) == 0 or Version(specifiers[0].version) < Version(min_version): - tox_requires[_at] = Requirement(f"tox>={min_version}") + tox_requires[at] = Requirement(f"tox>={min_version}") tox["requires"] = "\n".join(str(i) for i in tox_requires)