Skip to content

Commit 18e777d

Browse files
committed
Add types to push_sort_key tuple
1 parent bc0fca7 commit 18e777d

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

posit-bakery/posit_bakery/image/image_target.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from datetime import datetime
66
from enum import Enum
77
from pathlib import Path
8-
from typing import Annotated
8+
from typing import Annotated, TYPE_CHECKING
99

1010
import python_on_whales
1111
from pydantic import BaseModel, computed_field, ConfigDict, Field, model_validator
@@ -22,6 +22,10 @@
2222
from posit_bakery.image.image_metadata import MetadataFile, BuildMetadata
2323
from posit_bakery.settings import SETTINGS
2424

25+
# Local under TYPE_CHECKING to avoid a circular import
26+
if TYPE_CHECKING:
27+
from posit_bakery.config.image.parsed_version import ParsedVersion
28+
2529
log = logging.getLogger(__name__)
2630

2731

@@ -316,7 +320,7 @@ def is_primary_variant(self) -> bool:
316320
return self.image_variant.primary
317321

318322
@property
319-
def push_sort_key(self) -> tuple:
323+
def push_sort_key(self) -> tuple[str, bool, "ParsedVersion", int, str, str, str]:
320324
"""Deterministic ordering for push to ordered-display registries (e.g. Docker Hub).
321325
322326
Tuple semantics, ascending sort:

0 commit comments

Comments
 (0)