-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
Blocker 🙅Blocks the next releaseBlocks the next release
Description
Python 3.3 introduced "Implicit Namespace Packages" (based on PEP-420), which states the following:
"Native support for package directories that don’t require __init__.py marker files [...]".
In other words, if I have the following file structure (without any __init__.py files whatsoever):
foo/
bar/
baz.py
blah.py
And the content of blah.py is from foo.bar import baz; print(baz), then python3.5 ./blah.py will successfully output: <module 'foo.bar.baz' from '/tmp/foo/bar/baz.py'>.
The problem is, that pylint ./blah.py outputs:
E: 1, 0: Unable to import 'foo.bar' (import-error)
I tried to manipulate sys.path (from init-hook of my .pylintrc) in any which way, and nothing seemed to help except for adding the __init__.py files everywhere :(.
ymmt2005, villasv, szabolcsdombi, akras-apixio, tsirif and 8 more
Metadata
Metadata
Assignees
Labels
Blocker 🙅Blocks the next releaseBlocks the next release