Closed
Description
class A:
pass
A().__dict__
is a valid python3 statement but mypy (more a typeshed issue I guess) gives me
file:4: error: "A" has no attribute "__dict__"
So I modified added, in object
, __dict__ = ... # type: Dict[str, Any]
to stdlib/3/builtins.pyi
which indeed make it warning-less.
But, it is wrong, as
object().__dict__
fail with an AttributeError
.
Is there a better place to put this __dict__
? Or is it a mypy issue?
Metadata
Metadata
Assignees
Labels
No labels