Skip to content

Commit a92fa57

Browse files
committed
style: fix black formatting in repair.py and utils.py
JIRA: PULP-1573
1 parent 6c99ac8 commit a92fa57

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

pulp_python/app/tasks/repair.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,7 @@ def repair_metadata(content: QuerySet[PythonPackageContent]) -> tuple[int, set[s
127127
package.filename, main_artifact, domain, keep_temp_file=True
128128
)
129129
else:
130-
new_data = artifact_to_python_content_data(
131-
package.filename, main_artifact, domain
132-
)
130+
new_data = artifact_to_python_content_data(package.filename, main_artifact, domain)
133131
temp_path = None
134132

135133
total_metadata_repaired += update_metadata_artifact_if_needed(
@@ -319,9 +317,7 @@ def _process_metadata_batch(metadata_batch: list[tuple]) -> set[str]:
319317

320318
for package, main_artifact, temp_path in metadata_batch:
321319
if temp_path and os.path.exists(temp_path):
322-
metadata_artifact = artifact_to_metadata_artifact_from_path(
323-
package.filename, temp_path
324-
)
320+
metadata_artifact = artifact_to_metadata_artifact_from_path(package.filename, temp_path)
325321
else:
326322
metadata_artifact = artifact_to_metadata_artifact(package.filename, main_artifact)
327323
if metadata_artifact:

pulp_python/app/utils.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -315,9 +315,7 @@ def artifact_to_metadata_artifact(
315315
return metadata_artifact
316316

317317

318-
def artifact_to_metadata_artifact_from_path(
319-
filename: str, temp_wheel_path: str
320-
) -> Artifact | None:
318+
def artifact_to_metadata_artifact_from_path(filename: str, temp_wheel_path: str) -> Artifact | None:
321319
"""
322320
Creates artifact for metadata from an already-extracted wheel temp file.
323321
@@ -332,9 +330,7 @@ def artifact_to_metadata_artifact_from_path(
332330
if not metadata_content:
333331
return None
334332

335-
with tempfile.NamedTemporaryFile(
336-
"wb", dir=".", suffix=".metadata", delete=False
337-
) as temp_md:
333+
with tempfile.NamedTemporaryFile("wb", dir=".", suffix=".metadata", delete=False) as temp_md:
338334
temp_metadata_path = temp_md.name
339335
temp_md.write(metadata_content)
340336
temp_md.flush()

0 commit comments

Comments
 (0)