-
Notifications
You must be signed in to change notification settings - Fork 48
Make %p python path default #67
Comments
related: #58 |
You are talking about relative imports right? A fully qualified import should work. As you saw, relative imports are reported in #58 and fixed in the soon-to-be merged #61.
For context, the project directory ( |
I have a hard time understanding whether I am doing something wrong or there is a bug. My knowledge about Python and Atom isn't much and Atom has a very confusing definition of what a project is (+ you have "project home" setting, which doesn't have to do with "projects" aka "the folder you have open"..?) Let my try to explain what I expect to happen: I have two files in one directory. The
tester.py:
importer.py:
When I execute importer.py I see 'test1", so it works. However, I still get the error F0401 Unable to import tester in Atom. I have no idea if this is a relative or absolute import, since those terms are mostly used when talking about packages. I do not think this is considered a package, just two files in the same directory. The import is "absolute" compared to the project directory (if "project directory" means "root directory in atom"?)... I'm sorry for my lack of understanding, but a lot of the terms used here have confusing/implicit definitions. Feel free to explain them for me... |
#61 Does not fix the import problems for me. Ive tried a whole mess of different paths in the "Python Path" setting in linter-python settings and nada, still F0401 |
I think you should consider the negative consequences of messing with PYTHONPATH: #104 |
Still messed up for me too. No matter what I put in the pythonpath setting I get F0401 for any imports not coming from site-packages. pylint on the command line does not give this error. Im going to try and patch my local copy and see if I can fix it, its super annoying. Im not even using any custom sys.path |
I'm marking this as a duplicate of #58 since the root cause is the same, even if the steps to reproduce aren't exactly the same (just almost the same...). More explanation soon to be posted over there. |
Steps to reproduce:
What I get:
What I expect:
The default module searching behavior of the linter should be the same as that of Python itself. This is currently not the case, since
%p
is not added to the path. Is there a reason for this?The text was updated successfully, but these errors were encountered: