Represents a single suggestion being sent or returned from the autocomplete server
| 4 | |
| 5 | |
| 6 | class Suggestion: |
| 7 | """ |
| 8 | Represents a single suggestion being sent or returned from the |
| 9 | autocomplete server |
| 10 | """ |
| 11 | |
| 12 | def __init__( |
| 13 | self, string: str, score: float = 1.0, payload: Optional[str] = None |
| 14 | ) -> None: |
| 15 | self.string = to_string(string) |
| 16 | self.payload = to_string(payload) |
| 17 | self.score = score |
| 18 | |
| 19 | def __repr__(self) -> str: |
| 20 | return self.string |
| 21 | |
| 22 | |
| 23 | class SuggestionParser: |
no outgoing calls