Show More
@@ -1538,24 +1538,20 b' class IPCompleter(Completer):' | |||||
1538 |
|
1538 | |||
1539 | usedNamedArgs.add(token) |
|
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 | argMatches = [] |
|
1541 | argMatches = [] | |
1548 | for callableMatch in callableMatches: |
|
|||
1549 |
|
|
1542 | try: | |
1550 | namedArgs = self._default_arguments(eval(callableMatch, |
|
1543 | callableObj = '.'.join(ids[::-1]) | |
|
1544 | print(callableObj) | |||
|
1545 | namedArgs = self._default_arguments(eval(callableObj, | |||
1551 |
|
|
1546 | self.namespace)) | |
1552 | except: |
|
|||
1553 | continue |
|
|||
1554 |
|
1547 | |||
1555 | # Remove used named arguments from the list, no need to show twice |
|
1548 | # Remove used named arguments from the list, no need to show twice | |
1556 | for namedArg in set(namedArgs) - usedNamedArgs: |
|
1549 | for namedArg in set(namedArgs) - usedNamedArgs: | |
1557 | if namedArg.startswith(text): |
|
1550 | if namedArg.startswith(text): | |
1558 | argMatches.append(u"%s=" %namedArg) |
|
1551 | argMatches.append(u"%s=" %namedArg) | |
|
1552 | except: | |||
|
1553 | pass | |||
|
1554 | ||||
1559 | return argMatches |
|
1555 | return argMatches | |
1560 |
|
1556 | |||
1561 | def dict_key_matches(self, text): |
|
1557 | def dict_key_matches(self, text): |
General Comments 0
You need to be logged in to leave comments.
Login now