python / mypy

Optional static typing for Python
https://www.mypy-lang.org/
Other
18.5k stars 2.83k forks source link

Inconsistent output for MyPy with VS Code on Mac #9002

Closed FrankDMartinez closed 4 years ago

FrankDMartinez commented 4 years ago

I am using MyPy on a Mac (10.15.4) in VS Code (1.45.1). When I run mypy in the "Terminal" inside VS Code, I have no issues. However, the "Problems" window insists on reporting:

Cannot find implementation or library stub for module named 'jsonschema'.

I have a stub file for this library in a .stubs subdirectory of my project and have set the mypy_path value in the "mypy.ini" file in my project directory.

I have the following flags set in VS Code:

Oddly enough, the "Output" window for linting also shows no issues. The only place where any problem is reported in the "Problems" window. I changed the name of the module to "jsonschemq" to make sure everyone complained accordingly and, yes, they did.

So, my question is: can anyone point me in the direction of information to find what is wrong with my VSCode+MyPy set-up?

Thanks in advance.

FrankDMartinez commented 4 years ago

Scratch that. Apparently, a restart of VSCode was required.