Open rggjan opened 2 years ago
Same issue
Is this a dupe of https://github.com/python-attrs/attrs/issues/452?
I don't think so. In #452, the type itself is generic, which is causing issues. In my example, the types of the attributes are fixed and independent of "T", but inheriting from Generic still breaks the types.
@euresti? @Tinche? 🥺
Maybe @sobolevn might be able to give it a shot?
Weird. I don't get an error with mypy 0.950
$ mypy --version
mypy 0.950 (compiled: yes)
I do have a quick question since I can't repro. If this was re-written without attrs does it still have the same problem?
I think we only started seeing this in newer mypy
version. Could also be a mypy
issue?
Try with mypy 0.981
Yes, looks like a mypy issue. Please, open a new report there :)
Inheritance breaks
mypy
type checking with optional attributes ifGeneric
s are involved:There is an error displayed which is wrong. Doing the same without any Generic involved works as expected.
Not quite sure if this is a
mypy
issue or anattrs
typing issue.