Skip to content

typing.Protocol in 3.11 needs to be backported #104

Description

@Gobot1234
In [6]: @runtime_checkable
...: classBaseBadge(Protocol):
...: def__init__(self) ->None: ...
In [7]: BaseBadge.__init__Out[7]: <functiontyping._no_init_or_replace_init(self, *args, **kwargs)>

This behaviour is not consistent with python 3.11

>>> from typing import*
>>> @runtime_checkable
... classBaseBadge(Protocol):
... def__init__(self) -> None: ...
... >>> BaseBadge.__init__
<function BaseBadge.__init__ at 0x104f249a0>

This may have made me slightly concerned I was loosing my sanity in a subclass today 😀

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions