Skip to content

Commit 0a39278

Browse files
committed
Rename ref_or_type to ref_or_typeform
1 parent 6ea2a4a commit 0a39278

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Lib/functools.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff 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

922922
def _get_dispatch_param_and_annotation(func, *, skip_first=False):

0 commit comments

Comments
 (0)