#3182 changed mock.Mock to be an alias to Any, which resulted in mypy complaining about isinstance(x, mock.Mock), which I believe should be valid.
We can fix this by reverting #3182 or potentially by making Mock a class with an Any base class. Mock is a class at runtime, so making it an alias to Any (which is not a class) seems wrong to me.
#3182 changed
mock.Mockto be an alias toAny, which resulted in mypy complaining aboutisinstance(x, mock.Mock), which I believe should be valid.We can fix this by reverting #3182 or potentially by making
Mocka class with anAnybase class.Mockis a class at runtime, so making it an alias toAny(which is not a class) seems wrong to me.