Skip to content

Commit d28b513

Browse files
[pre-commit.ci] pre-commit autoupdate (#276)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.8.1 → v0.9.9](astral-sh/ruff-pre-commit@v0.8.1...v0.9.9) - [github.com/pre-commit/mirrors-mypy: v1.13.0 → v1.15.0](pre-commit/mirrors-mypy@v1.13.0...v1.15.0) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 9a9884a commit d28b513

File tree

3 files changed

+24
-24
lines changed

3 files changed

+24
-24
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ ci:
44
exclude: ^src/pdm/backend/_vendor
55
repos:
66
- repo: https://github.com/astral-sh/ruff-pre-commit
7-
rev: 'v0.8.1'
7+
rev: 'v0.9.9'
88
hooks:
99
- id: ruff
1010
args: [--fix, --exit-non-zero-on-fix, --show-fixes]
1111
- id: ruff-format
1212

1313
- repo: https://github.com/pre-commit/mirrors-mypy
14-
rev: v1.13.0
14+
rev: v1.15.0
1515
hooks:
1616
- id: mypy
1717
exclude: ^(src/pdm/backend/_vendor|tests|scripts)

src/pdm/backend/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ def evaluate_module_attribute(
205205
matched = _attr_regex.match(expression)
206206
if matched is None:
207207
raise ConfigError(
208-
"Invalid expression, must be in the format of " "`module:attribute`."
208+
"Invalid expression, must be in the format of `module:attribute`."
209209
)
210210
with cm:
211211
module = importlib.import_module(matched.group(1))

tests/test_api.py

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -254,20 +254,20 @@ def test_build_with_cextension(dist: Path) -> None:
254254

255255
zip_names = get_wheel_names(dist / wheel_name)
256256
assert "my_package/__init__.py" in zip_names
257-
assert (
258-
"my_package/hellomodule.c" not in zip_names
259-
), "Not collect c files while building wheel"
257+
assert "my_package/hellomodule.c" not in zip_names, (
258+
"Not collect c files while building wheel"
259+
)
260260
extension_suffix = ".pyd" if sys.platform == "win32" else ".so"
261261
assert any(name.endswith(extension_suffix) for name in zip_names)
262262

263263
tar_names = get_tarball_names(dist / sdist_name)
264264
assert "demo_package-0.1.0/my_package/__init__.py" in tar_names
265-
assert (
266-
"demo_package-0.1.0/my_package/hellomodule.c" in tar_names
267-
), "Collect c files while building sdist"
268-
assert not any(
269-
path.startswith("build") for path in tar_names
270-
), 'Not collect c files in temporary directory "./build"'
265+
assert "demo_package-0.1.0/my_package/hellomodule.c" in tar_names, (
266+
"Collect c files while building sdist"
267+
)
268+
assert not any(path.startswith("build") for path in tar_names), (
269+
'Not collect c files in temporary directory "./build"'
270+
)
271271

272272

273273
@pytest.mark.parametrize("name", ["demo-cextension-in-src"])
@@ -277,20 +277,20 @@ def test_build_with_cextension_in_src(dist: Path) -> None:
277277

278278
zip_names = get_wheel_names(dist / wheel_name)
279279
assert "my_package/__init__.py" in zip_names
280-
assert (
281-
"my_package/hellomodule.c" not in zip_names
282-
), "Not collect c files while building wheel"
280+
assert "my_package/hellomodule.c" not in zip_names, (
281+
"Not collect c files while building wheel"
282+
)
283283
extension_suffix = ".pyd" if sys.platform == "win32" else ".so"
284284
assert any(name.endswith(extension_suffix) for name in zip_names)
285285

286286
tar_names = get_tarball_names(dist / sdist_name)
287287
assert "demo_package-0.1.0/src/my_package/__init__.py" in tar_names
288-
assert (
289-
"demo_package-0.1.0/src/my_package/hellomodule.c" in tar_names
290-
), "Collect c files while building sdist"
291-
assert not any(
292-
path.startswith("build") for path in tar_names
293-
), 'Not collect c files in temporary directory "./build"'
288+
assert "demo_package-0.1.0/src/my_package/hellomodule.c" in tar_names, (
289+
"Collect c files while building sdist"
290+
)
291+
assert not any(path.startswith("build") for path in tar_names), (
292+
'Not collect c files in temporary directory "./build"'
293+
)
294294

295295

296296
@pytest.mark.parametrize("name", ["demo-package"])
@@ -329,9 +329,9 @@ def test_build_editable_src(dist: Path, fixture_project: Path) -> None:
329329
namelist = zf.namelist()
330330
assert "demo_package.pth" in namelist
331331
assert "_editable_impl_demo_package.py" in namelist
332-
assert (
333-
"my_package/data.json" not in namelist
334-
), "data files in proxy modules are excluded"
332+
assert "my_package/data.json" not in namelist, (
333+
"data files in proxy modules are excluded"
334+
)
335335
assert "data_out.json" in namelist
336336

337337
pth_content = zf.read("demo_package.pth").decode("utf-8").strip()

0 commit comments

Comments
 (0)