On 3/12/15 4:51 PM, Dani Hodovic wrote:
I have a very large project with deeply nested hierarchies. To find the root directory I use a source root walker and append the root directory to sys.path. This way, I can easily import things in the project relative to the root directory. The problem is that pylint doesn't detect this, even though I have a method which appends the path imported in the files where the path is used. So all my imports are marked as F0401 <http://pylint-messages.wikidot.com/messages:f0401>: Unable to import.

If you want to import everything relative to the root directory, why not set PYTHONPATH to point to the root directory, without sys.path manipulations? Then pylint will run the same way, and will find all of your imports.

--Ned.

_______________________________________________
code-quality mailing list
code-quality@python.org
https://mail.python.org/mailman/listinfo/code-quality

Reply via email to