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.
1 parent 19d925a commit 316741eCopy full SHA for 316741e
Lib/typing.py
@@ -2020,11 +2020,12 @@ def _proto_hook(cls, other):
2020
break
2021
2022
# ...or in annotations, if it is a sub-protocol.
2023
- annotations = _lazy_annotationlib.get_annotations(base, format=_lazy_annotationlib.Format.FORWARDREF)
2024
if (
2025
issubclass(other, Generic)
2026
and getattr(other, "_is_protocol", False)
2027
- and attr in annotations
+ and attr in _lazy_annotationlib.get_annotations(
+ base, format=_lazy_annotationlib.Format.FORWARDREF
2028
+ )
2029
):
2030
2031
else:
0 commit comments