Completion item to be included in the dictionary returned by new-style Matcher (API v2). .. warning:: Provisional This class is used to describe the currently supported attributes of simple completion items, and any additional implementation details should not
| 550 | |
| 551 | |
| 552 | class SimpleCompletion: |
| 553 | """Completion item to be included in the dictionary returned by new-style Matcher (API v2). |
| 554 | |
| 555 | .. warning:: |
| 556 | |
| 557 | Provisional |
| 558 | |
| 559 | This class is used to describe the currently supported attributes of |
| 560 | simple completion items, and any additional implementation details |
| 561 | should not be relied on. Additional attributes may be included in |
| 562 | future versions, and meaning of text disambiguated from the current |
| 563 | dual meaning of "text to insert" and "text to used as a label". |
| 564 | """ |
| 565 | |
| 566 | __slots__ = ["text", "type"] |
| 567 | |
| 568 | def __init__(self, text: str, *, type: Optional[str] = None): |
| 569 | self.text = text |
| 570 | self.type = type |
| 571 | |
| 572 | def __repr__(self): |
| 573 | return f"<SimpleCompletion text={self.text!r} type={self.type!r}>" |
| 574 | |
| 575 | |
| 576 | class _MatcherResultBase(TypedDict): |
no outgoing calls
searching dependent graphs…