Type hints for __new__
no longer work when subclassing Dict
#15135
Labels
bug
mypy got something wrong
Bug Report
mypy 1.1.1 introduces a new false positive on pymongo's codebase first noticed in python/typeshed#9694 (comment)
Type hints for
__new__
no longer work when subclassingDict
(ordict
).To Reproduce
I see the same behavior on 1.2 and latest:
Error:
Current workaround is to add
# type: ignore[type-var]
.Your Environment
--strict
although I'm not sure it's needed.mypy.ini
(and other config files): NoneNote that in the real code,
__new__
is needed to support pickle.The text was updated successfully, but these errors were encountered: