leinardi / pylint-pycharm

A plugin providing both real-time and on-demand scanning of Python files with PyLint from within PyCharm/IDEA.
Apache License 2.0
200 stars 36 forks source link

Add source roots to PyLint process #10

Closed bivald closed 6 years ago

bivald commented 6 years ago

Is your feature request related to a problem? Please describe. When running PyLint I get a lot of "unable to import module XYZ" which are actually my own source code folders.

Describe the solution you'd like It would be awesome if it would automatically add your source roots (from your project) to the PYTHONPATH.

Describe alternatives you've considered Modifying the pylint script to add the environments

Additional context Add any other context or screenshots about the feature request here.

leinardi commented 6 years ago

OK, sorry for the silly questions but, as I stated before, my background is Java and not Python:

  1. Is your request somehow related to #7 ?
  2. My fix for #7 was to use the PyCharm Python interpreter to run Pylint, can this change fix also this issue?
  3. If the answer for 2. is no, what should be done to actually fix this?
  4. Can you provide a sample project where I can reproduce the issue?
bivald commented 6 years ago

It’s similar to #7, but it doesn’t concern the packages included in virtualenv but the sources marked as source folders. I will make a reproducible sample, and make sure it’s not me who is missing something. It’s also possible that #7 does fix it so I will try it.

My problem was that pylint don’t find my sources, so it lints the files but all of my imports of my own package gives error).

Might be an error on my part as well :)

leinardi commented 6 years ago

Hi @bivald, could you please test v0.10.0 and let me know if it fixes this issue?

no-response[bot] commented 6 years ago

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.