Refactor references: Matching more names that might be related

Fixes davidhalter/jedi-vim#900.
See also davidhalter/jedi-vim#552.
This commit is contained in:
Dave Halter
2019-12-22 23:12:39 +01:00
parent f2a64e24c8
commit 1087b62e95
5 changed files with 122 additions and 39 deletions

View File

@@ -564,7 +564,7 @@ class ImportName(AbstractNameDefinition):
return m
# It's almost always possible to find the import or to not find it. The
# importing returns only one value, pretty much always.
return next(iter(import_values))
return next(iter(import_values)).as_context()
@memoize_method
def infer(self):