Skip to content
Prev Previous commit
Next Next commit
Add missing super().__init__() call, to be safe
  • Loading branch information
AlexWaygood authored Apr 1, 2023
commit d3f9ebee0fb88db3d87bac71180fa00ab853f2c4
1 change: 1 addition & 0 deletions Lib/typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -1998,6 +1998,7 @@ class _ProtocolMeta(ABCMeta):
# This metaclass is really unfortunate and exists only because of
# the lack of __instancehook__.
def __init__(cls, *args, **kwargs):
super().__init__(*args, **kwargs)
cls.__protocol_attrs__ = _get_protocol_attrs(cls)
# PEP 544 prohibits using issubclass()
# with protocols that have non-method members.
Expand Down