mypy-pycharm
mypy-pycharm copied to clipboard
"Mypy found no problems" after adding "[plugins]" part in mypy.ini
Step 1: Are you in the right place?
- [x] I have verified there are no duplicate active or recent bugs, questions, or requests
- [x] I have verified that I am using the latest version of the plugin.
Step 2: Describe your environment
- Plugin version:
0.15.0
- PyCharm/IDEA version:
2022.3.3
- Mypy version:
1.2.0
Step 3: Describe the problem:
I know, that similar problem was described in this issue. But nobody told, how to reproduce it. So, i will)
Steps to reproduce:
- install lib django-stubs[compatible-mypy] to your project with
pip install django-stubs[compatible-mypy]
- add it in plugins part like this:
[mypy]
mypy_path = stubs/
plugins =
mypy_django_plugin.main
Observed Results:
-
Mypy found no problems
So, after adding plugins
part mypy pycharm plugin cant find any problems. But, if u with run mypy
throung terminal, its finds problems.
Expected Results:
- Mypy plugin shows same errors as in terminal (
mypy binary
)
Before adding plugins
part:
After adding plugins
part:
Mypy binary:
My config:
[mypy]
mypy_path = stubs/
plugins =
mypy_django_plugin.main
[mypy.plugins.django-stubs]
django_settings_module = "config.settings"
I want to like pycharm, because I use Rider for C#, and Rider is awesome. But without mypy support, pycharm is dead on arrival...
Does this help you?
No. There are actually multiple different issues. But that was not one of them. mypy works perfectly for me. But pycharm doesn't appear to use mypy, which is the root of the issues. One issue is that pycharm treats a parameter written as someparam: str = None
as implicitly typed to Optional[str]
, rather than as a syntax error. The current pycharm behavior was deprecated in mypy a year or two ago. There are additional errors that mypy detects, but pycharm does not. I've gone back to using vscode for now, whilst for Unity/C#, Rider is pretty good.
Hi! I'm experiencing the same issue. Is there any workarounds about it?
Hi! I'm experiencing the same issue. Is there any workarounds about it?
Nope... I solved it by moving to VsCode. Its very shitty for python, but u can set up mypy pretty nicelly. And mypy is very important. Also have in plans find out, how mypy works in emacs