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

Support dotenv files discovery #376

Open
ilaner opened this issue Aug 20, 2023 · 4 comments
Open

Support dotenv files discovery #376

ilaner opened this issue Aug 20, 2023 · 4 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug needs investigation

Comments

@ilaner
Copy link

ilaner commented Aug 20, 2023

I'm using the pylint in VSCode to run a custom plugin of pylint. In the built in python extension, I set my the PYTHONPATH value in the .env file to the pylint plugin directory, and the extension is able to read the plugin and lint correctly.
However, when I tried migrating to the new pylint extension, it doesn't discover the env file, and as the PYTHONPATH variable isn't set, I do not get results from the custom plugins.

@github-actions github-actions bot added the triage-needed Issue is not triaged. label Aug 20, 2023
@karthiknadig
Copy link
Member

The temporary workaround until we resolve this is to set PYTHONPATH in your terminal before launching vscode from the terminal:

Linux/mac:

> cd <project dir>
> export PYTHONPATH=<path to your plugins>
> code .

Windows:

> cd <project dir>
> set PYTHONPATH=<path to your plugins>
> code .

@karthiknadig karthiknadig added bug Issue identified by VS Code Team member as probable bug needs investigation and removed triage-needed Issue is not triaged. labels Aug 28, 2023
@MerrettM
Copy link

MerrettM commented Oct 2, 2023

Seeing similar issues with my current project, any idea on when we can expect the linked PR to make it into a release so we don't have to keep using the workaround? It's currently the only thing stopping us from switching to use the new extension.

@adoebber
Copy link

adoebber commented Nov 6, 2023

@karthiknadig Can you tell us when we can expect a fix for this issue? It would be nice if the new extension worked in the same way as the old deprecated one.

@MerrettM
Copy link

Found another workaround which doesn't involve manually setting the PYTHONPATH in the terminal before starting VS Code with the code . command, it's not perfect but it works for us. You just need to add the following to your workspace settings (credit to Shinebayar G's answer on Stack Overflow):

"python.analysis.extraPaths": ["<whatever-you-were-manually-setting-the-pythonpath-to-before>"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug needs investigation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants