Skip to content

Commit 2cd8c00

Browse files
[pre-commit.ci] pre-commit autoupdate (#3081)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 434b443 commit 2cd8c00

File tree

9 files changed

+12
-12
lines changed

9 files changed

+12
-12
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ repos:
1919
- id: pyproject-fmt
2020
additional_dependencies: ["tox>=4.6.4"]
2121
- repo: https://github.com/pre-commit/mirrors-prettier
22-
rev: "v3.0.0"
22+
rev: "v3.0.1"
2323
hooks:
2424
- id: prettier
2525
args: ["--print-width=120", "--prose-wrap=always"]
@@ -29,7 +29,7 @@ repos:
2929
- id: blacken-docs
3030
additional_dependencies: [black==23.7]
3131
- repo: https://github.com/astral-sh/ruff-pre-commit
32-
rev: "v0.0.280"
32+
rev: "v0.0.282"
3333
hooks:
3434
- id: ruff
3535
args: [--fix, --exit-non-zero-on-fix]

src/tox/config/of_type.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def __call__(
9595
args.chain.append(chain_key)
9696
try:
9797
value = loader.load(key, self.of_type, self.factory, conf, args)
98-
except KeyError: # noqa: PERF203
98+
except KeyError:
9999
continue
100100
else:
101101
break

src/tox/config/source/discover.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def discover_source(config_file: Path | None, root_dir: Path | None) -> Source:
3636
try:
3737
src = src_type(candidate)
3838
break
39-
except ValueError: # noqa: PERF203
39+
except ValueError:
4040
continue
4141
if src is None:
4242
msg = f"could not find any config file in {config_file}"
@@ -53,7 +53,7 @@ def _locate_source() -> Source | None:
5353
candidate: Path = base / src_type.FILENAME
5454
try:
5555
return src_type(candidate)
56-
except ValueError: # noqa: PERF203
56+
except ValueError:
5757
pass
5858
return None
5959

src/tox/provision.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ def _get_missing(requires: list[Requirement]) -> list[tuple[Requirement, str | N
132132
package_name = canonicalize_name(package.name)
133133
try:
134134
dist = distribution(package_name)
135-
except PackageNotFoundError: # noqa: PERF203
135+
except PackageNotFoundError:
136136
missing.append((package, None))
137137
else:
138138
if not package.specifier.contains(dist.version, prereleases=True):

src/tox/session/cmd/legacy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def _handle_legacy_only_flags(option: Parsed, envs: EnvSelector) -> None: # noq
139139
for at, entry in enumerate(as_root_args):
140140
try:
141141
req = Requirement(entry)
142-
except InvalidRequirement: # noqa: PERF203
142+
except InvalidRequirement:
143143
continue
144144
if req.name in to_force:
145145
as_root_args[at] = str(to_force[req.name])

src/tox/session/cmd/run/single.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def run_command_set(
112112
outcomes.append(current_outcome)
113113
try:
114114
current_outcome.assert_success()
115-
except SystemExit as exception: # noqa: PERF203
115+
except SystemExit as exception:
116116
if cmd.ignore_exit_code:
117117
logging.warning("command failed but is marked ignore outcome so handling it as success")
118118
continue

src/tox/session/cmd/show_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def print_conf(is_colored: bool, conf: ConfigSet, keys: Iterable[str]) -> None:
101101
try:
102102
value = conf[key]
103103
as_str, multi_line = stringify(value)
104-
except Exception as exception: # because e.g. the interpreter cannot be found # noqa: BLE001, PERF203
104+
except Exception as exception: # because e.g. the interpreter cannot be found # noqa: BLE001
105105
as_str, multi_line = _colored(is_colored, Fore.LIGHTRED_EX, f"# Exception: {exception!r}"), False
106106
if multi_line and "\n" not in as_str:
107107
multi_line = False

src/tox/tox_env/python/virtual_env/package/cmd_builder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def perform_packaging(self, for_env: EnvConfigSet) -> list[Package]:
9393
msg = "stopping as failed to build package"
9494
raise Fail(msg)
9595
package_glob = self.conf["package_glob"]
96-
found = glob.glob(package_glob)
96+
found = glob.glob(package_glob) # noqa: PTH207
9797
if not found:
9898
msg = f"no package found in {package_glob}"
9999
raise Fail(msg)

tests/config/loader/ini/replace/test_replace_env_var.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ def test_replace_env_set_triple_bs(replace_one: ReplaceOne, monkeypatch: MonkeyP
3434
def test_replace_env_set_quad_bs(replace_one: ReplaceOne, monkeypatch: MonkeyPatch) -> None:
3535
"""Quad backslash should remain but not affect surrounding replacements."""
3636
monkeypatch.setenv("MAGIC", "something good")
37-
result = replace_one(r"\\{env:MAGIC}\\\\{env:MAGIC}" + "\\") # noqa: ISC003
38-
assert result == r"\\something good\\\\something good" + "\\" # noqa: ISC003
37+
result = replace_one(r"\\{env:MAGIC}\\\\{env:MAGIC}" + "\\")
38+
assert result == r"\\something good\\\\something good" + "\\"
3939

4040

4141
def test_replace_env_when_value_is_backslash(replace_one: ReplaceOne, monkeypatch: MonkeyPatch) -> None:

0 commit comments

Comments
 (0)