mirror of
https://github.com/davidhalter/parso.git
synced 2025-12-09 22:25:53 +08:00
Avoid nasty side effects in creation of Node
This issue led to bugs in Jedi, because Jedi used the nodes in a wrong way.
This commit is contained in:
@@ -60,7 +60,7 @@ def _assert_valid_graph(node):
|
||||
assert node.start_pos == actual, (node.start_pos, actual)
|
||||
else:
|
||||
for child in children:
|
||||
assert child.parent == node
|
||||
assert child.parent == node, (node, child)
|
||||
_assert_valid_graph(child)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user