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

Pylint highlight on column and not range; no hover message - VSCode #5299

Closed
carlos-ventura opened this issue Nov 13, 2021 · 5 comments
Closed
Labels
Bug 🪲 Downstream Bug 🪲 The problem happens in a lib depending on pylint, not pylint

Comments

@carlos-ventura
Copy link

carlos-ventura commented Nov 13, 2021

Bug description

When enabling pylint on the VSCode editor:
1 - The highlight of an error is not the whole word but just a column (just the first letter, image for clarification)
2 - There is no hover option to show the error when the cursor is on the highlight "letter"
Images below for better explanation
bug
As one can see there is only a small ~ below the the errors.
When the mouse is put on this ~ no message appears for a description of the error.

Configuration

No response

Command used

Not relevant

Pylint output

Unable to import 'networkx' pylint(import-error) [6, 1]
Unable to import 'bs4' pylint(import-error) [7, 1]
...

Expected behavior

It is expected that the whole word of the error would be highlighted and when the mouse would be put on the top of the error (hover) a pop-up message would appear explaining the error.

Pylint version

pylint 2.11.1
astroid 2.8.5
Python 3.10.0 (tags/v3.10.0:b494f59, Oct  4 2021, 19:00:18) [MSC v.1929 64 bit (AMD64)]

OS / Environment

Windows 10 Pro - 21H1

Additional dependencies

VSCode version - 1.62.2

@carlos-ventura carlos-ventura added Bug 🪲 Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling labels Nov 13, 2021
@cdce8p
Copy link
Member

cdce8p commented Nov 13, 2021

I've seen this too recently. Not sure the issue is pylint. We didn't change the output format. So I suspect it's something with the highlighting in either VSCode or the VSCode python extension.

Would be interesting to know the first affected version(s). Can't be too long ago, maybe 1.60 or 1.61? Don't have the time to test this at the moment, unfortunately.

@carlos-ventura If you are able, I would suggest testing an old VSCode version and raising the issue in their repo.

@cdce8p
Copy link
Member

cdce8p commented Nov 13, 2021

This "might" be related: microsoft/vscode-python#17398

@Pierre-Sassoulas Pierre-Sassoulas added Downstream Bug 🪲 The problem happens in a lib depending on pylint, not pylint and removed Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling labels Nov 13, 2021
@carlos-ventura
Copy link
Author

@cdce8p I tried reverting versions starting from the most recent and the version 1.61.2 worked and pylint works as intended.
Another problem I am currently having is previous run only shows the result of the actual run, doesn't return the last one.
(previous run: acutal_run_score, +0.00(always zero) )

@cdce8p
Copy link
Member

cdce8p commented Nov 14, 2021

Screen Shot 2021-11-14 at 22 41 57

An interesting observation: refactor messages don't seem to be effected only error.

@cdce8p
Copy link
Member

cdce8p commented Nov 18, 2021

@carlos-ventura The hover message has been fixed in vscode. I guess it will be included in 1.63.0 next month. microsoft/vscode#136711

Just for reference, there are also open vscode-python issues for it:
microsoft/vscode#142810
microsoft/vscode-python#17882

On a related note, pylint should ideally output ranges for errors so IDEs can highlight them better. microsoft/vscode-python#5336

@cdce8p cdce8p closed this as completed Nov 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🪲 Downstream Bug 🪲 The problem happens in a lib depending on pylint, not pylint
Projects
None yet
Development

No branches or pull requests

3 participants