Trying to setup mypy with my PyCharm Professional 2017.2. But it doesn't work. I also would like to setup mypy check on one particular file vs entire project, can some please share the way they have configured mypy in their PyCharm.
You can use the mypy-pycharm plugin to have real-time and on-demand scanning with mypy from within PyCharm/IDEA.
This plugin has also a feature to scan just the current selected file (the green play button on the left side bar):
You can add an external tool in the "run/Debug configurations" of pycharm.
Pycharm will then run mypy first, you will see a new tab in the run window, if it is successful then it can run your python script (or in my example below it will run my django unit tests).
There is also a trick to use $PyInterpretorDirectory$/mypy so that pycharm will pickup mypy from the right location.
Could be an import issue. Check mypy configurations for pycharm (assuming mypy plugin already installed)
Argument --follow-imports normal
makes the difference
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With