From 19ed08e4c91753affea797ad50e7efa03cbd52b7 2014-07-07 03:24:56 From: Thomas Kluyver Date: 2014-07-07 03:24:56 Subject: [PATCH] Merge pull request #6083 from takluyver/completer-docstrings Some docstring improvements in completer --- diff --git a/IPython/core/completer.py b/IPython/core/completer.py index 71df7e1..ac61fec 100644 --- a/IPython/core/completer.py +++ b/IPython/core/completer.py @@ -80,6 +80,7 @@ from IPython.core.error import TryNext from IPython.core.inputsplitter import ESC_MAGIC from IPython.utils import generics from IPython.utils import io +from IPython.utils.decorators import undoc from IPython.utils.dir2 import dir2 from IPython.utils.process import arg_split from IPython.utils.py3compat import builtin_mod, string_types @@ -216,7 +217,7 @@ def penalize_magics_key(word): return word - +@undoc class Bunch(object): pass @@ -865,6 +866,7 @@ class IPCompleter(Completer): return argMatches def dict_key_matches(self, text): + "Match string keys in a dictionary, after e.g. 'foo[' " def get_keys(obj): # Only allow completion for known in-memory dict-like types if isinstance(obj, dict) or\ @@ -1010,9 +1012,6 @@ class IPCompleter(Completer): def complete(self, text=None, line_buffer=None, cursor_pos=None): """Find completions for the given text and line context. - This is called successively with state == 0, 1, 2, ... until it - returns None. The completion should begin with 'text'. - Note that both the text and the line_buffer are optional, but at least one of them must be given.