Skip to content

Commit

Permalink
filter imported names during completion(consider as keyword)
Browse files Browse the repository at this point in the history
  • Loading branch information
wutingjia committed Oct 17, 2024
1 parent 642e224 commit a42ebf7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jedi/api/completion.py
Original file line number Diff line number Diff line change
Expand Up @@ -686,8 +686,8 @@ def extract_imported_names(node):
if node.type in ['import_as_names', 'dotted_as_names', 'import_as_name']:
for index, child in enumerate(node.children):
if child.type == 'name':
if (index > 0 and node.children[index - 1].type == "keyword" and
node.children[index - 1].value == "as"):
if (index > 0 and node.children[index - 1].type == "keyword"
and node.children[index - 1].value == "as"):
continue
imported_names.append(child.value)
elif child.type == 'import_as_name':
Expand Down

0 comments on commit a42ebf7

Please sign in to comment.