Hi again,

Quick followup. I got excellent help on the mypy issue on GitHub, and resolved to not use Protocol classes for the interface, but rather ABCs, given my runtime aspects of the use case.

Den tors 26 aug. 2021 kl 14:46 skrev Andreas Stenius <andreas.stenius@astekk.se>:
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, while ProtocolClass 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,
Cheers

This is a cross post from 
https://discuss.python.org/t/how-to-pass-a-reference-to-a-protocol-class/10301
Reported MyPy Issue: https://github.com/python/mypy/issues/10988