File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -903,20 +903,20 @@ def _get_dispatch_annotation(func, param):
903903 import annotationlib
904904 annotations = annotationlib .get_annotations (func , format = annotationlib .Format .FORWARDREF )
905905 try :
906- ref_or_type = annotations [param ]
906+ ref_or_typeform = annotations [param ]
907907 except KeyError :
908908 raise TypeError (
909909 f"Invalid first argument to `register()`: { param !r} . "
910910 f"Add missing annotation to parameter { param !r} of { func .__qualname__ !r} or use `@register(some_class)`."
911911 ) from None
912- if isinstance (ref_or_type , str ):
913- ref_or_type = annotationlib .ForwardRef (ref_or_type , owner = func )
914- if isinstance (ref_or_type , annotationlib .ForwardRef ):
912+ if isinstance (ref_or_typeform , str ):
913+ ref_or_typeform = annotationlib .ForwardRef (ref_or_typeform , owner = func )
914+ if isinstance (ref_or_typeform , annotationlib .ForwardRef ):
915915 try :
916- return ref_or_type .evaluate (owner = func )
916+ return ref_or_typeform .evaluate (owner = func )
917917 except Exception :
918918 pass
919- return ref_or_type
919+ return ref_or_typeform
920920
921921
922922def _get_dispatch_param_and_annotation (func , * , skip_first = False ):
You can’t perform that action at this time.
0 commit comments