@@ -480,8 +480,8 @@ def __getitem__(self, idx):
480480
481481
482482class MappingBase :
483- from_obj : type = None
484- to_obj : type = None
483+ from_obj : Optional [ type ] = None
484+ to_obj : Optional [ type ] = None
485485
486486 # Pending deprecation, move to from_obj and to_obj terminology
487487 from_resource = None
@@ -747,8 +747,8 @@ class ImmediateMapping(MappingBase, metaclass=MappingMeta):
747747def map_field (
748748 func : _F = None ,
749749 * ,
750- from_field : str = None ,
751- to_field : str = None ,
750+ from_field : Union [ None , str , Sequence [ str ]] = None ,
751+ to_field : Union [ None , str , Sequence [ str ]] = None ,
752752 to_list : bool = False ,
753753) -> Union [_F , Callable [[_F ], _F ]]:
754754 """Field decorator for custom mappings.
@@ -771,8 +771,8 @@ def inner(fun):
771771def map_list_field (
772772 func : _F = None ,
773773 * ,
774- from_field : str = None ,
775- to_field : str = None ,
774+ from_field : Union [ None , str , Sequence [ str ]] = None ,
775+ to_field : Union [ None , str , Sequence [ str ]] = None ,
776776) -> Union [_F , Callable [[_F ], _F ]]:
777777 """Field decorator for custom mappings that return a single list.
778778
@@ -787,7 +787,7 @@ def map_list_field(
787787def assign_field (
788788 func : _F = None ,
789789 * ,
790- to_field : str = None ,
790+ to_field : Union [ None , str , Sequence [ str ]] = None ,
791791 to_list : bool = False ,
792792) -> Union [_F , Callable [[_F ], _F ]]:
793793 """Field decorator for assigning a value to destination field without requiring a corresponding source field.
0 commit comments