from typing import Protocol class P(Protocol): x: int class B(P): # error pass