Skip to content

Commit

Permalink
Fix type hint on cast function for custom OmegaConf resolver
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanpainchaud committed Dec 20, 2024
1 parent 01b6533 commit e8882bb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/lightning_hydra_template/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
from hydra.core.override_parser.overrides_parser import OverridesParser
from hydra.utils import call
from omegaconf import DictConfig, OmegaConf
from sympy.categories import Object

from lightning_hydra_template.utils import pylogger, rich_utils

Expand Down Expand Up @@ -47,7 +46,7 @@ def _assert(condition: bool, throw_on_fail: bool = True) -> bool:
log.warning("Assertion of Hydra configuration failed!")
return condition

def _cast(obj: Object, cast_type: str = None) -> Any:
def _cast(obj: Any, cast_type: str = None) -> Any:
"""Defines a wrapper for basic operators, with the option to cast result to a type."""
if cast_type is not None:
cast_cls = (
Expand Down

0 comments on commit e8882bb

Please sign in to comment.