The static type system supporting type hints in Python is becoming more expressive with each new PEP, but PEP 544—Protocols: Structural subtyping (static duck typing) is the most important enhancement since type hints were first introduced. The typing.Protocol
special class lets you define types in terms of the interface implemented by objects, regardless of type hierarchies, in the spirit of duck typing—but in a way that can be verified by static type checkers and IDEs.