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

hovering over flake8 errors no longer shows error #17882

Closed
wardy3 opened this issue Oct 31, 2021 · 18 comments
Closed

hovering over flake8 errors no longer shows error #17882

wardy3 opened this issue Oct 31, 2021 · 18 comments
Assignees
Labels
area-linting bug Issue identified by VS Code Team member as probable bug

Comments

@wardy3
Copy link

wardy3 commented Oct 31, 2021

Environment data

  • VS Code version:
    Version: 1.62.0-insider (Universal)
    Commit: ff1e16eebb93af79fd6d7af1356c4003a120c563
    Date: 2021-10-29T05:14:09.436Z
    Electron: 13.5.1
    Chrome: 91.0.4472.164
    Node.js: 14.16.0
    V8: 9.1.269.39-electron.0
    OS: Darwin x64 20.6.0
  • Extension version (available under the Extensions sidebar): v2021.10.1365161279
  • OS and version: MacOS 11.6
  • Python version (& distribution if applicable, e.g. Anaconda): Python 3.7.2 via pyenv
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): poetry
  • Relevant/affected Python packages and their versions: flake8 3.9.2
  • Relevant/affected Python-related VS Code extensions and their versions:
    ❯ flake8 --version
    3.9.2 (aaa: 0.12.0, flake8-bandit: 2.1.2, flake8-broken-line: 0.3.0,
    flake8-bugbear: 21.9.2, flake8-comprehensions: 3.7.0, flake8-darglint: 1.8.0,
    flake8-debugger: 4.0.0, flake8-docstrings: 1.6.0, pydocstyle: 6.1.1,
    flake8-eradicate: 1.1.0, flake8-string-format: 0.3.0, flake8_2020: 1.6.0,
    flake8_commas: 2.1.0, flake8_isort: 4.0.0, flake8_quotes: 3.3.0, mccabe:
    0.6.1, naming: 0.11.1, pycodestyle: 2.7.0, pyflakes: 2.3.1, rst-docstrings:
    0.2.3, wemake_python_styleguide: 0.15.3) CPython 3.7.2 on Darwin
  • Value of the python.languageServer setting: Default

Expected behaviour

flake8 messages when hovering. This is VSCode 1.61:

image

Note the flake8 output on the first line

Actual behaviour

wiggly underlines are only 1 character wide, not the whole word.

pop up only includes base information and not flake8 messages

image

problems tab shows flake8 messages as expected

image

Steps to reproduce:

simple program with flake8 errors

x = "hi"

if x == "hello" or x == "hi":
    print("G'day")
❯ flake8 --select=B,B9,C,D,E,F,S,W,W504 --ignore=C812,C813,C815,C816,E203,E501,S101,W503,WPS111,WPS237,WPS301,WPS305,WPS306,WPS323,WPS336,WPS421,WPS465 --inline-quotes='"' --max-complexity=18 --max-imports=15 --max-line-complexity=18 --max-line-length=88 --max-local-variables=15 --max-module-members=15 --per-file-ignores="test_*:D102,DAR101,WPS110,WPS211,WPS226,WPS317,WPS432,WPS442,WPS450" --doctests --format="%(row)d,%(col)d,%(code).1s,%(code)s:%(text)s" crap.py
1,1,D,D100:Missing docstring in public module
3,4,W,WPS514:Found implicit `in` condition

[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]

Logs

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

XXX

@wardy3 wardy3 added bug Issue identified by VS Code Team member as probable bug triage-needed Needs assignment to the proper sub-team labels Oct 31, 2021
@karthiknadig karthiknadig added area-linting triage and removed triage-needed Needs assignment to the proper sub-team labels Nov 1, 2021
@wardy3
Copy link
Author

wardy3 commented Nov 5, 2021

This is now affecting the stable VSCode release

Version: 1.62.0 (Universal)
Commit: b3318bc0524af3d74034b8bb8a64df0ccf35549a
Date: 2021-11-03T15:24:41.297Z
Electron: 13.5.1
Chrome: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Darwin x64 21.1.0

@nmrtv
Copy link

nmrtv commented Nov 5, 2021

@wardy3 the same issue for me after the last update. This problem is OS independent and has appeared on two separate machines running Windows 10 and Linux.

It affects not only flake8 but also mypy. Pylance on the other hand works well.

@keyan3
Copy link

keyan3 commented Nov 5, 2021

Same issue for me with VSCode 1.62.0 and flake8 3.7.1. Downgrading to VSCode 1.61 fixed it.

@tlambert03
Copy link

same here, and also with mypy. vscode 1.62.0

Untitled

@sstoychev
Copy link

Version: 1.62.0 (system setup)
Commit: b3318bc0524af3d74034b8bb8a64df0ccf35549a
Date: 2021-11-03T15:23:01.379Z
Electron: 13.5.1
Chrome: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Windows_NT x64 10.0.19043

Working on RemoteSSH.

I have the same problem but with Pylint:
image
The following error is show in "Output -> Log (Remote extension host)"

[2021-11-08 09:08:15.594] [exthost] [error] [ms-python.python] provider FAILED
[2021-11-08 09:08:15.594] [exthost] [error] Canceled: Canceled
	at S.makeCancelError (/root/.vscode-server/extensions/ms-python.python-2021.11.1422169775/out/client/extension.js:9:151015)
	at S.handleFailedRequest (/root/.vscode-server/extensions/ms-python.python-2021.11.1422169775/out/client/extension.js:9:150866)
	at /root/.vscode-server/extensions/ms-python.python-2021.11.1422169775/out/client/extension.js:9:111208
	at async d.provideHover (/root/.vscode-server/bin/b3318bc0524af3d74034b8bb8a64df0ccf35549a/out/vs/server/remoteExtensionHostProcess.js:94:170516)

@Redoubts
Copy link

Redoubts commented Nov 9, 2021

Ditto for me on 1.62, though I noticed the hitbox for the lint popup is 1 or 2 pixels wide at the very front of the word.

@Redoubts
Copy link

Maybe related: microsoft/vscode#136711

@nmrtv
Copy link

nmrtv commented Nov 10, 2021

@Redoubts, probably. I have noticed that the common feature of this problem is that only the first character is marked with a wavy underline.

@diegovalenzuelaiturra
Copy link

diegovalenzuelaiturra commented Nov 17, 2021

Hi,

This workaround may be useful:

@rob4226
Copy link

rob4226 commented Nov 18, 2021

I am having the same problem with mypy (and flake8). I created an issue at the mypy extension matangover/mypy-vscode#43 but I guess it is related to this vscode update.

@floatingpurr
Copy link

Maybe related: microsoft/vscode#136711

Can anybody confirm that those issues are referred to the same problem?

@cdce8p
Copy link

cdce8p commented Nov 18, 2021

Maybe related: microsoft/vscode#136711

Can anybody confirm that those issues are referred to the same problem?

The hitbox issue has been fixed in the main branch of vscode. I guess it will be included in 1.63.0

@nmrtv
Copy link

nmrtv commented Nov 18, 2021

Can anybody confirm that those issues are referred to the same problem?

Yes, it's the same problem. I have tried and can confirm it.

@floatingpurr
Copy link

floatingpurr commented Nov 18, 2021

Ok thanx! Looking forward to bumping to 1.63.0

@nmrtv
Copy link

nmrtv commented Dec 9, 2021

Actually, this problem still exists in 1.63.0. With this fix, they just expanded the hit-box area from one pixel to one character. Now it's easier to hover, but still ugly.

@bilderbuchi
Copy link

bilderbuchi commented Dec 10, 2021

For those seeing only documentation boxes pop up -- at least for me the problem report is ordered below the docstring, so e.g. for an import-related problem, on hover I see the "keyword import" docs, and at the end the flake8 warning:
image
(on 1.63.0, and if I hover on the first character)

@nmrtv
Copy link

nmrtv commented Dec 11, 2021

Yes, but in version 1.61 it worked normally. Also, for some reason Pylance works well, and this problem only occurs with other linters. Lack of consistency. In general, seeing where all this is going lately, I'm switching to Neovim. I'm tired of constant regression bugs, slowing performance and increased memory usage. Jack of all trades, master of none. I think in a few years from a quick handy editor, this will become yet another bloatware.

@paulacamargo25
Copy link

Thanks for the bug report, we're going to addressing the bug here #17398

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 14, 2022
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