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

Plugin Doesn't Use Interpreter's PYTHONPATH #90

Open
2 tasks done
JonnoFTW opened this issue Mar 16, 2022 · 0 comments
Open
2 tasks done

Plugin Doesn't Use Interpreter's PYTHONPATH #90

JonnoFTW opened this issue Mar 16, 2022 · 0 comments

Comments

@JonnoFTW
Copy link

Step 1: Are you in the right place?

  • I have verified there are no duplicate active or recent bugs, questions, or requests
  • I have verified that I am using the latest version of the plugin.

Step 2: Describe your environment

  • Plugin version: 0.14.0
  • PyCharm/IDEA version: 2021.3.2 Professional Edition
  • Pylint version: 2.12.2

Step 3: Describe the problem:

Pylint plugin does not set PYTHONATH when running pylint. import-error will be returned for lines that would normally work because they are set in the project interpreter's custom PYTHONPATH. A typical use case is when I am using a git submodule and want to import code from it.

The plugin also does not give a way to manually pass environment variables to the pylint call

Steps to reproduce:

  1. Include code in subdirectory of project, eg. lib
  2. Add lib to pythonpath of interpreter: File -> Settings -> Project -> Python Interpreter -> Cog Icon -> Show All -> Show Paths (last icon in the top bar) -> + Icon -> Select Path of lib. Save settings
  3. Run pylint plugin
  4. You will get import errors for modules in lib

Observed Results:

  • Import Errors are returned (the swagger_client folder is under api_test/lib in the below screenshots)

image

image

Expected Results:

  • No import errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant