1
0
forked from VimPlug/jedi

Fixed a very nasty bug in deep_ast_copy.

This commit is contained in:
Dave Halter
2014-12-02 04:19:22 +01:00
parent 235672efc1
commit 99febfe6c2
2 changed files with 9 additions and 6 deletions

View File

@@ -51,7 +51,7 @@ def deep_ast_copy(obj, new_elements_default=None):
# tree in there.
items = sorted(items, key=sort_stmt)
else:
items = sorted(items, key=lambda x: x[0] != 'params')
items = sorted(items, key=lambda x: (x[0] != 'params', x[0] == 'names_dict'))
# Actually copy and set attributes.
new_obj = copy.copy(obj)