Open
Description
from dataclasses import dataclass
class Foo:
def __init__(self, value: int) -> None:
self.value = value # never gets run
@dataclass
class Bar(Foo):
value2: int
Bar(1).value # runtime error but no mypy error
not sure if this is supposed to be allowed but either way this fails at runtime, so mypy should warn about it:
AttributeError: 'Bar' object has no attribute 'value'. Did you mean: 'value2'?