How to make Type Checker get along with fake/mock objects?

I've got some unit tests that use fudge to mock out objects.  The type checker is looking at the function calls in the test and complaining "Expected type 'User', got 'Fake' instead", which is, of course, exactly right, but it's not being useful here.

I don't want to put a put a #noinspection comment next to every such line, and I'd prefer not to have to disable type checker on the whole class.  Is there a way to organize things such that pycharm will treat my fake User object as an acceptable substitute to the real one?
0
1 comment
There is no good solution for this at the moment. I've filed a feature request:
http://youtrack.jetbrains.com/issue/PY-7688
1

Please sign in to leave a comment.