##// END OF EJS Templates
removed expansion of function name when copleting kw-args
Elyashiv -
Show More
@@ -1538,24 +1538,20 b' class IPCompleter(Completer):'
1538 1538
1539 1539 usedNamedArgs.add(token)
1540 1540
1541 # lookup the candidate callable matches either using global_matches
1542 # or attr_matches for dotted names
1543 if len(ids) == 1:
1544 callableMatches = self.global_matches(ids[0])
1545 else:
1546 callableMatches = self.attr_matches('.'.join(ids[::-1]))
1547 1541 argMatches = []
1548 for callableMatch in callableMatches:
1549 try:
1550 namedArgs = self._default_arguments(eval(callableMatch,
1551 self.namespace))
1552 except:
1553 continue
1542 try:
1543 callableObj = '.'.join(ids[::-1])
1544 print(callableObj)
1545 namedArgs = self._default_arguments(eval(callableObj,
1546 self.namespace))
1554 1547
1555 1548 # Remove used named arguments from the list, no need to show twice
1556 1549 for namedArg in set(namedArgs) - usedNamedArgs:
1557 1550 if namedArg.startswith(text):
1558 1551 argMatches.append(u"%s=" %namedArg)
1552 except:
1553 pass
1554
1559 1555 return argMatches
1560 1556
1561 1557 def dict_key_matches(self, text):
General Comments 0
You need to be logged in to leave comments. Login now