mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-13 17:21:52 +08:00
Fix an async funcdef issue, fixes 1092.
This commit is contained in:
@@ -88,10 +88,12 @@ def get_flow_branch_keyword(flow_node, node):
|
||||
keyword = first_leaf
|
||||
return 0
|
||||
|
||||
|
||||
def get_statement_of_position(node, pos):
|
||||
for c in node.children:
|
||||
if c.start_pos <= pos <= c.end_pos:
|
||||
if c.type not in ('decorated', 'simple_stmt', 'suite') \
|
||||
if c.type not in ('decorated', 'simple_stmt', 'suite',
|
||||
'async_stmt', 'async_funcdef') \
|
||||
and not isinstance(c, (tree.Flow, tree.ClassOrFunc)):
|
||||
return c
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user