mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 14:34:31 +08:00
ignore completion in import aliases
This commit is contained in:
@@ -135,6 +135,9 @@ class Script(object):
|
|||||||
l = self._module.get_line(self.pos[0])[:self.pos[1]]
|
l = self._module.get_line(self.pos[0])[:self.pos[1]]
|
||||||
if not l.endswith('import import'):
|
if not l.endswith('import import'):
|
||||||
continue
|
continue
|
||||||
|
a = s.import_stmt.alias
|
||||||
|
if a and a.start_pos <= self.pos <= a.end_pos:
|
||||||
|
continue
|
||||||
names = s.get_defined_names(on_import_stmt=True)
|
names = s.get_defined_names(on_import_stmt=True)
|
||||||
else:
|
else:
|
||||||
names = s.get_defined_names()
|
names = s.get_defined_names()
|
||||||
|
|||||||
Reference in New Issue
Block a user