Mypy "Linting Output" empty despite regular command reporting errors
See original GitHub issueEnvironment data
- VS Code version: 1.38.1
- Extension version (available under the Extensions sidebar): 2019.9.3491.1
- OS and version: Windows 10 Pro
- Python version (& distribution if applicable, e.g. Anaconda): Anaconda Python 3.7.3 or 3.6.9
- Type of virtual environment used (N/A | venv | virtualenv | conda | …): conda (miniconda)
- Relevant/affected Python packages and their versions: mypy 0.720
- Jedi or Language Server? (i.e. what is
"python.jediEnabled"
set to; more info #3977): Jedi Enabled True
Expected behaviour
Output from the mypy command is displayed in the OUTPUT tab under the Python dropdown, and the contents is parsed to be shown in the Problems tab
Actual behaviour
OUTPUT tab shows the command being executed (twice actually), but the Linting Output - mypy
is empty. Copy-pasting the exact mypy
command shown in this tab to a command prompt prints some errors as expected.
Yesterday I thought I had solved the problem by completely uninstalling and reinstalling miniconda, creating the virtual env again, which solved the problem for a little while. Now the problem is back. Cannot get mypy to work with either the base
miniconda env or my custom one.
Steps to reproduce:
- Create virtual environment with version python=3.6 or python=3.7 using miniconda3 on Windows
- Install
mypy
throughpip install
orconda install
- Select this environment from the status bar
- Open document with expected mypy errors
- Display OUTPUT tab and select Python from the dropdown list
- Observe the
##########Linting Output - mypy##########
being empty
Logs
> ~\AppData\Local\Continuum\miniconda3\envs\smsl\python.exe -m black --line-length 120 --skip-string-normalization --diff --quiet c:\...\file.py.10dc09022f6774807dcf3aee42e24318.py
cwd: c:\...
> ~\AppData\Local\Continuum\miniconda3\envs\smsl\python.exe -m black --line-length 120 --skip-string-normalization --diff --quiet c:\...\file.py.10dc09022f6774807dcf3aee42e24318.py
cwd: c:\...
> ~\AppData\Local\Continuum\miniconda3\envs\smsl\python.exe -m flake8 --max-line-length=120 --exclude=__init__.py --format=%(row)d,%(col)d,%(code).1s,%(code)s:%(text)s c:\...\file.py
cwd: c:\...
> ~\AppData\Local\Continuum\miniconda3\envs\smsl\python.exe -m flake8 --max-line-length=120 --exclude=__init__.py --format=%(row)d,%(col)d,%(code).1s,%(code)s:%(text)s c:\...\file.py
cwd: c:\...
> ~\AppData\Local\Continuum\miniconda3\envs\smsl\python.exe -m mypy --ignore-missing-imports c:\...\file.py
cwd: c:\...
> ~\AppData\Local\Continuum\miniconda3\envs\smsl\python.exe -m mypy --ignore-missing-imports c:\...\file.py
cwd: c:\...
##########Linting Output - mypy##########
##########Linting Output - flake8##########
53,1,D,D102:Missing docstring in public method
200,1,D,D102:Missing docstring in public method
234,1,D,D102:Missing docstring in public method
This is what the same command outputs if I run it in a separate terminal
(smsl) C:\Users\...>C:\Users\...\AppData\Local\Continuum\miniconda3\envs\smsl\python.exe -m mypy --ignore-missing-imports file.py
file.py:18: error: Module 'utilities.generic_utilities' has no attribute 'Config'
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:13
Top Results From Across the Web
Common issues and solutions - mypy 0.991 documentation
Common issues and solutions# · Can't install mypy using pip# · No errors reported for obviously wrong code# · Spurious errors and locally...
Read more >Mypy Documentation - Read the Docs
Mypy is a static type checker for Python. Type checkers help ensure that you're using variables and functions in your code correctly.
Read more >Jeremy Fortune on Twitter: "@kimadeline_m I was able to reproduce ...
Mypy "Linting Output" empty despite regular command reporting errors · Issue #7595 · microsoft/vs... Environment data VS Code version: 1.38.1 Extension ...
Read more >PEP 484 – Type Hints - Python Enhancement Proposals
This PEP introduces a provisional module to provide these standard definitions and tools, along with some conventions for situations where annotations are not ......
Read more >Mypy not displaying errors when target file has absolute path
No form of mypy configuration file used anywhere (though I also performed the same tests with a project containing a config file that...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@kimadeline great to see this is being fixed! @beeb interesting – possibly I’m facing a different issue than the original 😕 @karrtikr I was also not using any nonstandard names (foo, bar in fact 😄)
Thanks @karrtikr but it isn’t. I found that issue when I was looking up my problem but it was unrelated to filename, as I used very simple names when testing.