Skip to content

Commit

Permalink
fix: typing
Browse files Browse the repository at this point in the history
  • Loading branch information
gmertes committed Jan 13, 2025
1 parent e834064 commit f1367a2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/anemoi/inference/checkpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from collections import defaultdict
from functools import cached_property
from pathlib import Path
from typing import Optional

from anemoi.utils.checkpoints import load_metadata
from earthkit.data.utils.dates import to_datetime
Expand Down Expand Up @@ -179,7 +180,7 @@ def validate_environment(
*,
all_packages: bool = False,
on_difference: str = "warn",
exempt_packages: list[str] | None = None,
exempt_packages: Optional[list[str]] = None,
) -> bool:
return self._metadata.validate_environment(
all_packages=all_packages, on_difference=on_difference, exempt_packages=exempt_packages
Expand Down
3 changes: 2 additions & 1 deletion src/anemoi/inference/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from functools import cached_property
from types import MappingProxyType as frozendict
from typing import Literal
from typing import Optional

import numpy as np
from anemoi.transform.variables import Variable
Expand Down Expand Up @@ -461,7 +462,7 @@ def validate_environment(
*,
all_packages: bool = False,
on_difference: Literal["warn", "error", "ignore"] = "warn",
exempt_packages: list[str] | None = None,
exempt_packages: Optional[list[str]] = None,
) -> bool:
"""
Validate environment of the checkpoint against the current environment.
Expand Down

0 comments on commit f1367a2

Please sign in to comment.