Skip to content

Commit f9d6c6d

Browse files
Copilotyarikoptic
andcommitted
Address code review feedback: move import to top, improve logging
Co-authored-by: yarikoptic <39889+yarikoptic@users.noreply.github.com>
1 parent a81cd07 commit f9d6c6d

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

src/tinuous/github.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from collections.abc import Iterator
44
from datetime import datetime, timezone
55
from functools import cached_property
6+
import json
67
from pathlib import Path
78
import re
89
from typing import Any, Dict, List, Optional
@@ -310,9 +311,12 @@ def get_package_assets(self) -> Iterator[GHPackageAsset]:
310311
if ts <= self.since or (self.until is not None and ts > self.until):
311312
continue
312313
self.register_build(ts, True)
314+
tags = version.metadata.container.tags
315+
tags_str = ", ".join(tags) if tags else "(no tags)"
313316
log.info(
314-
"Found package version %s for %s",
315-
version.metadata.container.tags,
317+
"Found package version %s (tags: %s) for %s",
318+
version.name,
319+
tags_str,
316320
pkg.name,
317321
)
318322
yield GHPackageAsset(
@@ -322,7 +326,7 @@ def get_package_assets(self) -> Iterator[GHPackageAsset]:
322326
package_type=pkg.package_type,
323327
version_id=version.id,
324328
version_name=version.name,
325-
tags=version.metadata.container.tags,
329+
tags=tags,
326330
)
327331

328332

@@ -641,8 +645,6 @@ def download(self, path: Path) -> list[Path]:
641645
target,
642646
)
643647
# Write metadata as JSON
644-
import json
645-
646648
metadata = {
647649
"package_name": self.package_name,
648650
"package_type": self.package_type,

0 commit comments

Comments
 (0)