Show More
@@ -841,24 +841,28 b' class IPCompleter(Completer):' | |||
|
841 | 841 | call_obj = obj.__call__ |
|
842 | 842 | ret += self._default_arguments_from_docstring( |
|
843 | 843 | getattr(call_obj, '__doc__', '')) |
|
844 | try: | |
|
845 |
|
|
|
846 |
|
|
|
847 |
|
|
|
844 | ||
|
845 | if PY3: | |
|
846 | _keepers = (inspect.Parameter.KEYWORD_ONLY, | |
|
847 | inspect.Parameter.POSITIONAL_OR_KEYWORD) | |
|
848 | try: | |
|
848 | 849 | sig = inspect.signature(call_obj) |
|
849 | 850 | ret.extend(k for k, v in sig.parameters.items() if |
|
850 | 851 | v.kind in _keepers) |
|
851 |
e |
|
|
852 | except ValueError: | |
|
853 | pass | |
|
854 | else: | |
|
855 | try: | |
|
852 | 856 | args, _, _1, defaults = inspect.getargspec(call_obj) |
|
853 | 857 | if defaults: |
|
854 | 858 | ret += args[-len(defaults):] |
|
855 | except TypeError: | |
|
856 | pass | |
|
859 | except TypeError: | |
|
860 | pass | |
|
857 | 861 | return list(set(ret)) |
|
858 | 862 | |
|
859 | 863 | def python_func_kw_matches(self,text): |
|
860 | 864 | """Match named parameters (kwargs) of the last open function""" |
|
861 | ||
|
865 | ||
|
862 | 866 | if "." in text: # a parameter cannot be dotted |
|
863 | 867 | return [] |
|
864 | 868 | try: regexp = self.__funcParamsRegex |
General Comments 0
You need to be logged in to leave comments.
Login now