Skip to content

Enable pylint suggestion keep showing up even though Pylint is enabled (in multiroot workspaces) #15559

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

Closed
ashep opened this issue Mar 5, 2021 · 10 comments
Labels
area-linting bug Issue identified by VS Code Team member as probable bug verified Verification succeeded

Comments

@ashep
Copy link

ashep commented Mar 5, 2021

Environment data

  • VS Code version: 1.54.0
  • Extension version (available under the Extensions sidebar): v2021.2.582707922
  • OS and version: Linux x64 5.11.2-arch1-1
  • Python version (& distribution if applicable, e.g. Anaconda): 3.5.10
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): venv
  • Relevant/affected Python packages and their versions:
  • Relevant/affected Python-related VS Code extensions and their versions: pylance-2021.3.0
  • Value of the python.languageServer setting: pylance-2021.3.0

Expected behaviour

After clicking "Enable pylint" button and have "python.linting.pylintEnabled" setting set to true, it is expected to stop seeing pop-up message "You have a pylintrc file in your workspace. Do you want to enable pylint?".

Actual behaviour

The popup window "You have a pylintrc file in your workspace. Do you want to enable pylint?" pops up each time I start vscode despite on having python.linting.pylintEnabled" setting set to true.

Steps to reproduce:

  1. Open vscode
  2. Open any .py file
  3. See the pop up message "You have a pylintrc file in your workspace. Do you want to enable pylint?".
  4. Click "Enable pylint button".
  5. Close vscode
  6. Open vscode
  7. See that message again
@ashep ashep added triage-needed Needs assignment to the proper sub-team bug Issue identified by VS Code Team member as probable bug labels Mar 5, 2021
@ghost ghost removed the triage-needed Needs assignment to the proper sub-team label Mar 8, 2021
@karrtikr
Copy link

karrtikr commented Mar 9, 2021

Thanks for the bug report! We investigate issues in order based on priority and severity, which includes the impact it has on your ability to use the extension to do productive work, and the number of people affected. If other users come forward and leave a comment demonstrating they are seeing/reproducing the problem then we will raise this issue's priority.

If you think your issue is more of a question or configuration problem rather than a bug, please ask on Stack Overflow with the visual-studio-code and python labels for help.

Thanks for your understanding and patience!

@karrtikr
Copy link

karrtikr commented Mar 22, 2021

Hi @ashep , your issues seems to be the dup of #12971. Can you try the suggestion #12971 (comment) mentioned there?

@karrtikr karrtikr added the info-needed Issue requires more information from poster label Mar 22, 2021
@karrtikr
Copy link

karrtikr commented Mar 22, 2021

I'm able to reproduce this issue, thanks! This only happens in a multiroot scenario. In my case the first folder has a pylintrc file, the second folder didn't. On opening settings.json I get the prompt.

The workarounds mentioned in #12971 should help. Did you open any specific files or had any files opened when you saw the prompt?

@karrtikr karrtikr added needs PR and removed info-needed Issue requires more information from poster triage labels Mar 22, 2021
@karrtikr karrtikr removed their assignment Mar 22, 2021
@karrtikr karrtikr changed the title pylint install suggestion always appears at vscode start Enable pylint suggestion keep showing up even though Pylint is enabled (in multiroot workspaces) Mar 22, 2021
@ashep
Copy link
Author

ashep commented Mar 23, 2021

Hi @karrtikr! Thanks for the help. Yes, I have several .py files opened when I see that message at VS Code start. And my environment isn't a multiroot one. It is a normal single-root workspace.

@karrtikr
Copy link

I see, did you open that workspace using Open folder... or Add folder to workspace...? Note even if you have one folder but you used the Add folder to workspace... option, it's considered a multiroot scenario.

@ashep
Copy link
Author

ashep commented Mar 23, 2021

Oh, I didn't know that if I have one folder opened with Add folder to workspace option, this makes my environment a multi root one. Thank you for pointing! Actually I always used the Add folder to workspace for some reason, so yes, my environment is multi root.

@karrtikr
Copy link

Great. FYI If you're working with a workspace (.code-workspace), it's considered a multiroot scenario. In this case you didn't save the workspace yet, but you're still adding folders to a workspace.

@WyattGosling
Copy link

I'm seeing this as well.

I'm using Code 1.56.2 with Python 2021.5.842923320. I saw it in an earlier version as well, but I cannot remember which. I updated the Python extension this morning to see if the issue would go away. I am also using a multi-root workspace.

I looked for python.linting.pylintEnabled and saw that I did not have anything set in my global settings.json file, nor the code-workspace file, nor any individual workspace folder's setting settings.json. I did notice though that the VS Code default value for this setting is true. I tried putting this setting in my global settings.json, reloaded, and noticed the prompt has gone away.

(Fairly speculative) I wonder if the code that checks if this prompt should be displayed is somehow not consulting the VS Code default value for this setting. When setting the value, the API may check if you are just setting it to the current value and do nothing in that case. Or alternatively check if you are setting to the default and remove any entries.

@kimadeline
Copy link

Related to #442

@kimadeline
Copy link

We removed the "You have a pylintrc file in your workspace. Do you want to enable pylint?" prompt as part of #17225, closing this issue as stale.

@kimadeline kimadeline added the verified Verification succeeded label Sep 21, 2021
@kimadeline kimadeline added this to the September 2021 milestone Sep 21, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 3, 2021
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 verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

5 participants