- Put eq_plugin.py somewhere in your project
- Add plugins=path/to/eq_plugin.py to the mypy section of your mypy.ini (see example in this gist)
- Run
mypy
$ mypy example.py # Also in this gist
example.py:7: warning: Equality comparison between "example.MyClass" and "def () -> example.MyClass"
example.py:10: warning: Equality comparison between "example.MyClass" and "builtins.int"