#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.