Skip to content

Commit d2aaeef

Browse files
committed
Fix linter
1 parent 042098f commit d2aaeef

File tree

3 files changed

+5
-11
lines changed

3 files changed

+5
-11
lines changed

plux/build/hatchling.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,7 @@ def update(self, metadata: dict) -> None:
272272
except configparser.Error as e:
273273
# Invalid format is a user error - fail the build with clear message
274274
raise ValueError(
275-
f"Failed to parse plux.ini at {plux_ini_path}. "
276-
f"Please check the file format. Error: {e}"
275+
f"Failed to parse plux.ini at {plux_ini_path}. Please check the file format. Error: {e}"
277276
) from e
278277

279278
if not entry_points:
@@ -293,6 +292,7 @@ def update(self, metadata: dict) -> None:
293292
f"across {len(entry_points)} groups"
294293
)
295294

295+
296296
@hookimpl
297297
def hatch_register_metadata_hook():
298298
"""Register the PluxMetadataHook with hatchling.

tests/build/test_hatchling.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"""
44

55
import configparser
6-
from pathlib import Path
76

87
import pytest
98

@@ -229,9 +228,7 @@ def test_hook_activates_in_manual_mode(self, tmp_path):
229228

230229
# Entry points should be added
231230
assert "entry-points" in metadata
232-
assert metadata["entry-points"] == {
233-
"plux.test.plugins": {"myplugin": "mysrc.plugins:MyPlugin"}
234-
}
231+
assert metadata["entry-points"] == {"plux.test.plugins": {"myplugin": "mysrc.plugins:MyPlugin"}}
235232

236233
def test_hook_uses_custom_static_file_name(self, tmp_path):
237234
"""Test that hook uses custom entrypoint_static_file setting."""

tests/cli/test_entrypoints.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -246,16 +246,13 @@ def test_hatchling_metadata_hook_with_manual_build_mode():
246246
with zipfile.ZipFile(wheel_file, "r") as zip:
247247
members = zip.namelist()
248248
# find the entry_points.txt in the .dist-info directory
249-
entry_points_file = next(
250-
(m for m in members if m.endswith(".dist-info/entry_points.txt")), None
251-
)
249+
entry_points_file = next((m for m in members if m.endswith(".dist-info/entry_points.txt")), None)
252250

253251
# Verify that entry_points.txt exists and contains the expected entry points
254252
assert entry_points_file is not None, "entry_points.txt should exist in wheel"
255253

256254
with zip.open(entry_points_file) as f:
257255
lines = [line.decode().strip() for line in f.readlines() if line.strip()]
258256
assert lines == expected_entry_points, (
259-
f"Entry points in wheel don't match expected. "
260-
f"Got: {lines}, Expected: {expected_entry_points}"
257+
f"Entry points in wheel don't match expected. Got: {lines}, Expected: {expected_entry_points}"
261258
)

0 commit comments

Comments
 (0)