Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No visual indication of mypy linting errors #1440

Closed
nathanshelly opened this issue Apr 19, 2018 · 5 comments
Closed

No visual indication of mypy linting errors #1440

nathanshelly opened this issue Apr 19, 2018 · 5 comments
Labels
area-linting bug Issue identified by VS Code Team member as probable bug

Comments

@nathanshelly
Copy link

nathanshelly commented Apr 19, 2018

Environment data

  • VS Code version: 1.22.2
  • Extension version (available under the Extensions sidebar): 2018.3.1
  • OS and version: macOS - High Sierra 10.13.4
  • Python version: Python 3.6.5
  • Type of virtual environment used: N/A
  • Relevant Python package - mypy 0.580

Actual behavior

Linting errors from output not displayed visually (no red, squiggly underlining or recognized issues in Problems tab).

Expected behavior

Expect visual indication (in underlining and Problems tab) of mypy linting errors.

Steps to reproduce:

  1. Create a new file, add 'hi' + 1 (or anything that should trigger a linting error)
  2. Save then see no visible indication that you've written incorrect code (though the Python output shows errors)

Logs

mypy

Seems to maybe be related to these issues (though those issues were marked fixed) - #343 & #245

@brettcannon brettcannon added bug Issue identified by VS Code Team member as probable bug area-linting needs verification labels Apr 19, 2018
@brettcannon
Copy link
Member

I get red squiggles, so I can't reproduce:
untitled

Make sure that you have the following in your settings.json:

"python.linting.enabled": true,
"python.linting.mypyEnabled": true

@balta2ar
Copy link

balta2ar commented May 8, 2018

@brettcannon Speaking of squiggles, I find them a bit too shy and modest in their attempt to bring my attention to the potential problem (especially red squiggles). They are like: "erm, Sir, sorry to disturb you, but there is something you might want to look at", while I'd like them to be more of a: "ERMAHGERD!! THIS INSTANCE DOES NOT HAVE THIS METHOD!! DO SOMETHING ABOUT IT NOW OTHERWISE WE ALL DIE!!!". I mean, I wish red squiggles were a bit more apparent and hard to miss. Yes, they are also marked in the scrollbar, but there they are also a bit tiny. Can errors paint current line in gutter red as well? Or is there an option to increase the line width of the squiggle?

@DonJayamanne
Copy link

mean, I wish red squiggles were a bit more apparent and hard to miss. Yes, they are also marked in the scrollbar, but there they are also a bit tiny. Can errors paint current line in gutter red as well? Or is there an option to increase the line width of the squiggle?

We could use the gutter, but that would be inconsistent with the rest of vscode. This is something you'll have to raise on the vscode repo.

@eeyang92
Copy link

Hi, I am also facing this issue.

"python.linting.mypyEnabled": true

I see all the output correctly in the Output tab:

##########Linting Output - mypy##########
src/core/src/talker.py:6:1: error: Function is missing a type annotation
src/core/src/talker.py:7:5: error: Call to untyped function "init" in typed context
src/core/src/talker.py:9:12: error: Call to untyped function "create_node" in typed context
src/core/src/talker.py:15:5: error: Function is missing a type annotation
src/core/src/talker.py:25:5: error: Name 'timer_period' already defined on line 22
src/core/src/talker.py:29:5: error: Call to untyped function "spin" in typed context
src/core/src/talker.py:36:5: error: Call to untyped function "shutdown" in typed context
src/core/src/talker.py:40:5: error: Call to untyped function "main" in typed context

However there are no Problems reported or squiggly lines shown.

@brettcannon
Copy link
Member

@eeyang92 please open a separate issue.

@microsoft microsoft locked as resolved and limited conversation to collaborators Jun 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-linting bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

5 participants