Hi,I’m in a position, where I’d like to be able to pass a reference to a Protocol Class, however, I can’t find a way to describe that variable with the current type system, as
Type[ProtocolClass]
means a class implementing said protocol, where I want the protocol itself, whileProtocolClass
means an instance of a class implementing the protocol.So I haven’t figured out if PEP 544 specifies a type that describes the Protocol class itself, rather than just its compatible implementations.
I tried to file this as a mypy bug, but no response yet, and alas, figure it may even be overlooked by the PEP in question.
Anyway, I’d very much appreciate a few more eyes and input on this matter.
Thank you,
CheersThis is a cross post fromReported MyPy Issue: https://github.com/python/mypy/issues/10988