Skip to content

Commit 3dc49b9

Browse files
[pre-commit.ci] pre-commit autoupdate (#12)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent e1b7877 commit 3dc49b9

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.5.0
3+
rev: v4.6.0
44
hooks:
55
- id: end-of-file-fixer
66
- id: trailing-whitespace
@@ -20,7 +20,7 @@ repos:
2020
- id: pyproject-fmt
2121
additional_dependencies: ["tox>=4.12.1"]
2222
- repo: https://github.com/astral-sh/ruff-pre-commit
23-
rev: "v0.2.2"
23+
rev: "v0.3.5"
2424
hooks:
2525
- id: ruff-format
2626
- id: ruff

src/py_discovery/_info.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,7 @@ def abs_path(v: str | None) -> str | None:
135135

136136
config_var_keys = set()
137137
for element in self.sysconfig_paths.values():
138-
for k in _CONF_VAR_RE.findall(element):
139-
config_var_keys.add(k[1:-1])
138+
config_var_keys.update(k[1:-1] for k in _CONF_VAR_RE.findall(element))
140139
config_var_keys.add("PYTHONFRAMEWORK")
141140

142141
self.sysconfig_vars = {i: sysconfig.get_config_var(i or "") for i in config_var_keys}
@@ -666,7 +665,7 @@ def _run_subprocess(cls: type[PythonInfo], exe: str, env: MutableMapping[str, st
666665
result.executable = exe # keep the original executable as this may contain initialization code
667666
return result
668667

669-
msg = f"{exe} with code {code}{f' out: {out!r}' if out else ''}{f' err: {err!r}' if err else ''}"
668+
msg = f"{exe} with code {code}{f' out: {out!r}' if out else ''}{f" err: {err!r}" if err else ''}"
670669
return RuntimeError(f"failed to query {msg}")
671670

672671

0 commit comments

Comments
 (0)