python-language-server
python-language-server copied to clipboard
Resolve imports for modules that manipulate __path__
Suppose I have the following directory structure:
.
├── module
│ └── stuff
│ └── __init__.py
└── real-module
└── stuff
└── foo
└── __init__.py
And the contents of module/stuff/__init__.py is:
from os import path
module_path = path.join(__file__, "..", "..", "..", "real-module", "stuff")
__path__.append(module_path)
execfile(path.join(module, "__init__.py"))
Then any code that imports module.stuff.foo will actually end up with real-module/stuff/foo. However, pyls doesn't follow the dynamic __path__ generation here. Is there any way I can configure pyls to tell it that module.stuff.foo is actually real-modules/stuff/foo?