We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
ForwardRef
1 parent 26c0fbf commit 0b3697dCopy full SHA for 0b3697d
class_singledispatch/__init__.py
@@ -71,11 +71,7 @@ def resolve_annotated_type(func: Callable[..., _R]) -> type[Any]:
71
raise TypeError(msg)
72
for key, value in func_annotations.items():
73
if isinstance(value, str):
74
- func_annotations[key] = ForwardRef(
75
- value,
76
- is_class=False, # we decorate functions, not classes
77
- is_argument=True, # func is not a module
78
- )
+ func_annotations[key] = ForwardRef(value)
79
argument_name, generic_alias = next(iter(get_type_hints(func).items()))
80
if not (
81
isinstance(generic_alias, (GenericAlias, OldFashionGenericAlias))
0 commit comments