Skip to content

No visual indication of mypy linting errors #1440

Closed

Description

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

Activity

  1. brettcannon commented on May 7, 2018

    @brettcannon
    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
  2. balta2ar commented on May 8, 2018

    @balta2ar

    Brett Cannon (@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?

  3. DonJayamanne commented on May 8, 2018

    @DonJayamanne

    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.

  4. eeyang92 commented on Jun 18, 2018

    @eeyang92

    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.

  5. brettcannon commented on Jun 18, 2018

    @brettcannon
    Member

    Eric Yang (@eeyang92) please open a separate issue.

  6. locked as resolved and limited conversation to collaborators on Jun 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-lintingbugIssue identified by VS Code Team member as probable bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions