Skip to content

Commit 8f3212d

Browse files
authored
Fix FuzzyWordCompleter meta_dict type hint to match WordCompleter (#2070)
* Fix FuzzyWordCompleter meta_dict type hint to match WordCompleter * Move Mapping import to collections.abc
1 parent 42f2251 commit 8f3212d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/prompt_toolkit/completion/fuzzy_completer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from __future__ import annotations
22

33
import re
4-
from collections.abc import Callable, Iterable, Sequence
4+
from collections.abc import Callable, Iterable, Mapping, Sequence
55
from typing import NamedTuple
66

77
from prompt_toolkit.document import Document
@@ -189,7 +189,7 @@ class FuzzyWordCompleter(Completer):
189189
def __init__(
190190
self,
191191
words: Sequence[str] | Callable[[], Sequence[str]],
192-
meta_dict: dict[str, str] | None = None,
192+
meta_dict: Mapping[str, AnyFormattedText] | None = None,
193193
WORD: bool = False,
194194
) -> None:
195195
self.words = words

0 commit comments

Comments
 (0)