mypy
mypy copied to clipboard
(🎁) Error when `__get__` returns incompatible type
class A: ...
class B(A):
def __get__(self, i, o) -> int:
return 1
class Something:
a: A = B()
reveal_type(Something.a) # Revealed type is "A"
actual value at runtime is int