Skip to content

Commit 2c135a8

Browse files
[pre-commit.ci] pre-commit autoupdate (#267)
Co-authored-by: Bernát Gábor <bgabor8@bloomberg.net>
1 parent 290f643 commit 2c135a8

4 files changed

Lines changed: 6 additions & 8 deletions

File tree

‎.pre-commit-config.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ repos:
2323
hooks:
2424
- id: pyproject-fmt
2525
- repo: https://github.com/astral-sh/ruff-pre-commit
26-
rev: "v0.15.13"
26+
rev: "v0.15.14"
2727
hooks:
2828
- id: ruff-format
2929
- id: ruff

‎src/pyproject_api/_backend.py‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,7 @@ def run(argv): # noqa: C901, PLR0912, PLR0915
9090
try:
9191
cmd = parsed_message["cmd"]
9292
print("Backend: run command {} with args {}".format(cmd, parsed_message["kwargs"]))
93-
outcome = backend_proxy(parsed_message["cmd"], **parsed_message["kwargs"])
94-
result["return"] = outcome
93+
result["return"] = backend_proxy(cmd, **parsed_message["kwargs"])
9594
if cmd == "_exit":
9695
break
9796
except BaseException as exception: # noqa: BLE001

‎tests/demo_pkg_inline/build.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def get_requires_for_build_sdist(config_settings: dict[str, str] | None = None)
9999
if "HAS_REQUIRES_EDITABLE" in os.environ:
100100

101101
def get_requires_for_build_editable(config_settings: dict[str, str] | None = None) -> list[str]: # noqa: ARG001
102-
return [1] if "REQUIRES_EDITABLE_BAD_RETURN" in os.environ else ["editables"] # type: ignore[list-item]
102+
return [1] if "REQUIRES_EDITABLE_BAD_RETURN" in os.environ else ["editables"] # type: ignore[invalid-return-type]
103103

104104

105105
if "HAS_PREPARE_EDITABLE" in os.environ:
@@ -114,7 +114,7 @@ def prepare_metadata_for_build_editable(
114114
(dest.parent / arc_name).write_text(dedent(data).strip())
115115
print(f"created metadata {dest}") # noqa: T201
116116
if "PREPARE_EDITABLE_BAD" in os.environ:
117-
return 1 # type: ignore[return-value] # checking bad type on purpose
117+
return 1 # type: ignore[invalid-return-type] # checking bad type on purpose
118118
return dist_info
119119

120120

@@ -124,5 +124,5 @@ def build_editable(
124124
config_settings: dict[str, str] | None = None,
125125
) -> str:
126126
if "BUILD_EDITABLE_BAD" in os.environ:
127-
return 1 # type: ignore[return-value] # checking bad type on purpose
127+
return 1 # type: ignore[invalid-return-type] # checking bad type on purpose
128128
return build_wheel(wheel_directory, metadata_directory, config_settings)

‎tests/test_frontend_setuptools.py‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,7 @@ def test_setuptools_prepare_metadata_for_build_wheel(frontend_setuptools: Subpro
7272
assert list(dist.entry_points) == [EntryPoint(name="demo_exe", value="demo:a", group="console_scripts")]
7373
assert dist.version == "1.0"
7474
assert dist.metadata["Name"] == "demo"
75-
values = [v for k, v in dist.metadata.items() if k == "Requires-Dist"] # type: ignore[attr-defined]
76-
# ignore because "PackageMetadata" has no attribute "items"
75+
values = dist.metadata.get_all("Requires-Dist") or []
7776
expected = ["magic>3", "requests>2"] if sys.version_info[0:2] > (3, 8) else ["magic >3", "requests >2"]
7877
assert sorted(values) == expected
7978
assert isinstance(result.out, str)

0 commit comments

Comments
 (0)