Are you reporting a bug, or opening a feature request?
Bug
Minimal repro
from typing import Protocol
class SomeProtocol(Protocol):
y : int
x : int = 3
class Class(SomeProtocol):
pass
def test1() -> None:
y: int = Class.y # runtime error. mypy should catch it?
def test2() -> None:
x: int = Class.x # runs fine, but should probably be a mypy error?
What is the actual behavior/output?
mypy reports no errors.
What is the behavior/output you expect?
I would expect mypy to complain that Class does not have class attributes x nor y (they are not marked with ClassVar).
What are the versions of mypy and Python you are using?
mypy: 0.782
python: 3.8.3
What are the mypy flags you are using? (For example --strict-optional)
No flags