Returns a Linepart namedtuple instance or None given cursor and line A Linepart namedtuple contains a start, stop, and word. None is returned if no target for this type of completion is found under the cursor.
(self, cursor_offset: int, line: str)
| 252 | |
| 253 | @abc.abstractmethod |
| 254 | def locate(self, cursor_offset: int, line: str) -> LinePart | None: |
| 255 | """Returns a Linepart namedtuple instance or None given cursor and line |
| 256 | |
| 257 | A Linepart namedtuple contains a start, stop, and word. None is |
| 258 | returned if no target for this type of completion is found under |
| 259 | the cursor.""" |
| 260 | raise NotImplementedError |
| 261 | |
| 262 | def format(self, word: str) -> str: |
| 263 | return word |