From cd8655b1a0863275d5c435d7f299bef4d0e98730 Mon Sep 17 00:00:00 2001 From: Olivier Delalleau <507137+odelalleau@users.noreply.github.com> Date: Thu, 4 Mar 2021 22:18:39 -0500 Subject: [PATCH] Update function signature --- omegaconf/nodes.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/omegaconf/nodes.py b/omegaconf/nodes.py index c94ad2c6f..a68af557a 100644 --- a/omegaconf/nodes.py +++ b/omegaconf/nodes.py @@ -341,9 +341,7 @@ def _validate_and_convert_impl(self, value: Any) -> Optional[Enum]: return self.validate_and_convert_to_enum(enum_type=self.enum_type, value=value) @staticmethod - def validate_and_convert_to_enum( - enum_type: Type[Enum], value: Any - ) -> Optional[Enum]: + def validate_and_convert_to_enum(enum_type: Type[Enum], value: Any) -> Enum: if not isinstance(value, (str, int)) and not isinstance(value, enum_type): raise ValidationError( f"Value $VALUE ($VALUE_TYPE) is not a valid input for {enum_type}"