From e8882bbf24c7d1e804663700a80cc08486994acb Mon Sep 17 00:00:00 2001 From: Nathan Painchaud Date: Sat, 21 Dec 2024 00:42:53 +0100 Subject: [PATCH] Fix type hint on cast function for custom OmegaConf resolver --- src/lightning_hydra_template/utils/utils.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lightning_hydra_template/utils/utils.py b/src/lightning_hydra_template/utils/utils.py index 1b37f8cd1..f4260cbcc 100644 --- a/src/lightning_hydra_template/utils/utils.py +++ b/src/lightning_hydra_template/utils/utils.py @@ -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 @@ -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 = (