Function
resolve_display_name
(
channel: str, slug: str, source_ref: str, override: str
)
Source from the content-addressed store, hash-verified
| 68 | |
| 69 | |
| 70 | def resolve_display_name( |
| 71 | channel: str, slug: str, source_ref: str, override: str |
| 72 | ) -> str: |
| 73 | if override: |
| 74 | return override |
| 75 | if channel == "dev": |
| 76 | return "dev" |
| 77 | if channel == "latest": |
| 78 | return f"Latest ({source_ref})" if source_ref.startswith("v") else "Latest" |
| 79 | return slug |
| 80 | |
| 81 | |
| 82 | def ensure_existing(path: Path, label: str) -> None: |
Tested by
no test coverage detected