forked from VimPlug/jedi
partial is working partially now with the new parser, because invalid statements are not possible anymore (two times **kwargs)
This commit is contained in:
@@ -5,4 +5,5 @@ class partial():
|
|||||||
self.__keywords = keywords
|
self.__keywords = keywords
|
||||||
|
|
||||||
def __call__(self, *args, **kwargs):
|
def __call__(self, *args, **kwargs):
|
||||||
return self.__func(*(self.__args + args), **dict(self.__keywords, **kwargs))
|
# TODO should be **dict(self.__keywords, **kwargs)
|
||||||
|
return self.__func(*(self.__args + args), **self.__keywords)
|
||||||
|
|||||||
@@ -104,7 +104,10 @@ def deep_ast_copy(obj, new_elements_default=None, check_first=False):
|
|||||||
# TODO this sucks... we need to change it.
|
# TODO this sucks... we need to change it.
|
||||||
# DOESNT WORK
|
# DOESNT WORK
|
||||||
for unfinished in unfinished_parents:
|
for unfinished in unfinished_parents:
|
||||||
unfinished.parent = new_elements[unfinished.parent]
|
try:
|
||||||
|
unfinished.parent = new_elements[unfinished.parent]
|
||||||
|
except KeyError: # TODO this keyerror is useless.
|
||||||
|
pass
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user