Skip to content

Commit 9b64aaa

Browse files
committed
lint
1 parent 344f21e commit 9b64aaa

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/nwp_consumer/internal/entities/repometadata.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ def __post_init__(self) -> None:
7474
"""Post-initialization to set delay_minutes if not set."""
7575
self.set_delay_minutes()
7676

77+
@staticmethod
78+
def model() -> ModelMetadata:
79+
"""Get the model metadata."""
80+
raise NotImplementedError("Subclasses must implement this method.")
7781

7882
def set_delay_minutes(self) -> None:
7983
"""Set the delay_minutes from the model if not already set."""
@@ -98,6 +102,9 @@ def determine_latest_it_from(self, t: dt.datetime, running_hours: list[int]) ->
98102
Returns:
99103
The latest available initialization time prior to the given time.
100104
"""
105+
if self.delay_minutes is None:
106+
raise ValueError("delay_minutes must be set to determine latest initialization time.")
107+
101108
it = (
102109
t.replace(minute=0, second=0, microsecond=0) - dt.timedelta(minutes=self.delay_minutes)
103110
).replace(minute=0)

0 commit comments

Comments
 (0)