-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Remove code lenses for "set as interpreter" #3854
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
Comments
Agreed; or at least there should be a way to hide this hint via |
This is probably overkill but it may help some people. This notification is powered by Code Lens. If you set |
I seem to use CodeLens quite a bit from your link. I'd advocate for removing it once the python has been explicitly set by user action. |
Any update on this? |
How to reproduce? 🤔 |
We are going through old issues and we noticed that no one from the team had replied to this issue. I want to apologize for the oversight and to let you know that the issue was reviewed by the team and triaged (as shown by the labels applied to this issue). |
This comment has been minimized.
This comment has been minimized.
Hello, I too find this very annoying. Not to mention that the hint moves up and down as I type... I think this could be very easily solved by adding something like if (this.workspace.getInterpreter() !== undefined) {
return [];
} at
Unfortunately, I am not familiar with this extension, so I don't know how to I've looked into it a bit more, and it seems that we could use the public if (this.interpreterService._pythonPathSetting === '') {
return [];
} However, I don't think @inject(IInterpreterService) interpreterService: IInterpreterService in the constructor. @brettcannon do you have any tip about this ? |
@francois-rozet That leading underscore means you shouldn't be poking around at it. 😄 @luabud is the "needs PR" for dropping the feature or for making it disappear when the environment has been chosen? |
Oh my bad. Then adding a getter to that variable ( |
@brettcannon I believe we originally have agreed to hide it once the interpreter is set. I think we should open a discussion about removing this feature though 🤔 |
As an addition, I too feel it a little bit annoying, any updates on it? I would like to add more info on it, my VSCode & Python-extension Version:
As you can see, my OS is windows, after thoroughly read this #736, I found the problem is caused by using Shebang. If I remove |
@zhongxiang117 no updates as no one has participated in any discussion. 😄 |
@brettcannon , that is sad, but the issue is still open. Hope you can soon or happen to fix them.. |
@zhongxiang117 to be clear, when I say "no one has participated in any discussion" I mean in this issue, not our team so we are currently not the hold-up on this. IOW no one has said whether they think full removal is better than simply hiding the lens if the interpreter has been set. |
@brettcannon I don't think the feature is very useful in itself, so it could be completely removed. Otherwise, hiding is fine and I think it can be implemented very fast as I mentioned above (#3854 (comment)). |
+1 that this is a largely useless feature worth dropping (commenting instead of thumbs-upping in hopes this moves the needle on "sufficient discussion") |
Hi everyone 👋 You can add the following to your User settings as a workaround: "[python]": {
"editor.codeLens": false,
} Search for |
This one is about removing https://github.com/microsoft/vscode-python/blob/main/src/client/interpreter/display/shebangCodeLensProvider.ts as well as references to it |
Assign this to me please. |
Closes #3854 Removed shebangCodeLensProvider and IShebangCodeLensProvider as well as their references and instances. Also removed the setShebangInterpreter.
Closes microsoft#3854 Removed shebangCodeLensProvider and IShebangCodeLensProvider as well as their references and instances. Also removed the setShebangInterpreter.
…19853) Closes microsoft/vscode-python#3854 Removed shebangCodeLensProvider and IShebangCodeLensProvider as well as their references and instances. Also removed the setShebangInterpreter.
#736
I don't know if you have usage statistics on this but it seems more annoying than useful. I am almost always working within a virtualenv which I set by clicking on the bottom left and selecting my python interpreter.
The hashbang by design is super generic, like
#!/usr/bin/env python3
. Clicking "set as interpreter" just changes it to system python which is almost always not useful, especially when you're already in a virtualenv.I recommend removing this suggestion all together or at the very least removing it when the python path is explicitly listed in settings.json
The text was updated successfully, but these errors were encountered: