mirror of
https://github.com/davidhalter/jedi.git
synced 2026-02-09 15:51:25 +08:00
Better completions in comments.
This commit is contained in:
@@ -550,6 +550,10 @@ class BaseNode(Base):
|
||||
try:
|
||||
return c.get_leaf_for_position(position, include_prefixes)
|
||||
except AttributeError:
|
||||
while c.type in ('indent', 'dedent'):
|
||||
# We'd rather not have indents and dedents as a leaf,
|
||||
# because they don't contain indentation information.
|
||||
c = c.get_next_leaf()
|
||||
return c
|
||||
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user