mirror of
https://github.com/davidhalter/parso.git
synced 2025-12-09 22:25:53 +08:00
Fix an issue in the diff parser
Forgot to check for functions/classes that were part of a decorator/async func. Fixes https://github.com/davidhalter/jedi/issues/1132
This commit is contained in:
@@ -570,7 +570,9 @@ class _NodesStack(object):
|
||||
self._tos = _NodesStackNode(tree_node, self._tos)
|
||||
self._tos.add(list(tree_node.children))
|
||||
self._update_tos(tree_node.children[-1])
|
||||
elif tree_node.type in ('classdef', 'funcdef'):
|
||||
elif tree_node.type in ('decorated', 'classdef', 'funcdef',
|
||||
'async_funcdef') \
|
||||
or tree_node.type == 'async_stmt' and tree_node.children[0].type == 'funcdef':
|
||||
self._update_tos(tree_node.children[-1])
|
||||
|
||||
def close(self):
|
||||
|
||||
Reference in New Issue
Block a user