mirror of
https://github.com/davidhalter/jedi.git
synced 2026-02-21 20:08:28 +08:00
Relative imports should be working again even when used in more special occasions. Fixes #973
There are more fixes needed. Some things are just very unclean and might lead to further bugs.
This commit is contained in:
@@ -213,7 +213,7 @@ class Importer(object):
|
||||
|
||||
if level:
|
||||
base = module_context.py__package__().split('.')
|
||||
if base == ['']:
|
||||
if base == [''] or base == ['__main__']:
|
||||
base = []
|
||||
if level > len(base):
|
||||
path = module_context.py__file__()
|
||||
|
||||
Reference in New Issue
Block a user