Show More
@@ -462,7 +462,7 b' def _deduplicate_completions(text: str, completions: _IC)-> _IC:' | |||
|
462 | 462 | seen.add(new_text) |
|
463 | 463 | |
|
464 | 464 | |
|
465 | def rectify_completions(text: str, completions: _IC, *, _debug=False)->_IC: | |
|
465 | def rectify_completions(text: str, completions: _IC, *, _debug: bool = False) -> _IC: | |
|
466 | 466 | """ |
|
467 | 467 | Rectify a set of completions to all have the same ``start`` and ``end`` |
|
468 | 468 | |
@@ -479,6 +479,8 b' def rectify_completions(text: str, completions: _IC, *, _debug=False)->_IC:' | |||
|
479 | 479 | text that should be completed. |
|
480 | 480 | completions : Iterator[Completion] |
|
481 | 481 | iterator over the completions to rectify |
|
482 | _debug : bool | |
|
483 | Log failed completion | |
|
482 | 484 | |
|
483 | 485 | Notes |
|
484 | 486 | ----- |
@@ -1128,16 +1130,23 b' class IPCompleter(Completer):' | |||
|
1128 | 1130 | secondary optional dict for completions, to |
|
1129 | 1131 | handle cases (such as IPython embedded inside functions) where |
|
1130 | 1132 | both Python scopes are visible. |
|
1131 | use_readline : bool, optional | |
|
1132 | DEPRECATED, ignored since IPython 6.0, will have no effects | |
|
1133 | config : Config | |
|
1134 | traitlet's config object | |
|
1135 | **kwargs | |
|
1136 | passed to super class unmodified. | |
|
1133 | 1137 | """ |
|
1134 | 1138 | |
|
1135 | 1139 | self.magic_escape = ESC_MAGIC |
|
1136 | 1140 | self.splitter = CompletionSplitter() |
|
1137 | 1141 | |
|
1138 | 1142 | # _greedy_changed() depends on splitter and readline being defined: |
|
1139 | Completer.__init__(self, namespace=namespace, global_namespace=global_namespace, | |
|
1140 | config=config, **kwargs) | |
|
1143 | super().__init__( | |
|
1144 | self, | |
|
1145 | namespace=namespace, | |
|
1146 | global_namespace=global_namespace, | |
|
1147 | config=config, | |
|
1148 | **kwargs | |
|
1149 | ) | |
|
1141 | 1150 | |
|
1142 | 1151 | # List where completion matches will be stored |
|
1143 | 1152 | self.matches = [] |
@@ -2055,9 +2064,9 b' class IPCompleter(Completer):' | |||
|
2055 | 2064 | |
|
2056 | 2065 | Parameters |
|
2057 | 2066 | ---------- |
|
2058 |
cursor_line |
|
|
2067 | cursor_line | |
|
2059 | 2068 | Index of the line the cursor is on. 0 indexed. |
|
2060 |
cursor_pos |
|
|
2069 | cursor_pos | |
|
2061 | 2070 | Position of the cursor in the current line/line_buffer/text. 0 |
|
2062 | 2071 | indexed. |
|
2063 | 2072 | line_buffer : optional, str |
General Comments 0
You need to be logged in to leave comments.
Login now