[1.16] Regression in inferring type via unittest.mock.Mock #19184
Labels
bug
mypy got something wrong
topic-inference
When to infer types or require explicit annotations
topic-protocols
Uh oh!
There was an error while loading. Please reload this page.
Bug Report
Regression on type inference found in aiohttp:master.
Seems like the regression may be related to inheriting from Any (which mypy complains about, but is done in typeshed regardless, and has been for many years).
To Reproduce
This is a fairly minimal reproducer of the issue:
1.15 Behavior
(First error disappears if we actually import Mock.)
1.16 Behavior
The text was updated successfully, but these errors were encountered: