Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update type definition for words argument #1889

Merged
merged 2 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/prompt_toolkit/completion/fuzzy_completer.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import annotations

import re
from typing import Callable, Iterable, NamedTuple
from typing import Callable, Iterable, NamedTuple, Sequence

from prompt_toolkit.document import Document
from prompt_toolkit.filters import FilterOrBool, to_filter
Expand Down Expand Up @@ -187,7 +187,7 @@ class FuzzyWordCompleter(Completer):

def __init__(
self,
words: list[str] | Callable[[], list[str]],
words: Sequence[str] | Callable[[], Sequence[str]],
meta_dict: dict[str, str] | None = None,
WORD: bool = False,
) -> None:
Expand Down
4 changes: 2 additions & 2 deletions src/prompt_toolkit/completion/word_completer.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import annotations

from typing import Callable, Iterable, Mapping, Pattern
from typing import Callable, Iterable, Mapping, Pattern, Sequence

from prompt_toolkit.completion import CompleteEvent, Completer, Completion
from prompt_toolkit.document import Document
Expand Down Expand Up @@ -33,7 +33,7 @@ class WordCompleter(Completer):

def __init__(
self,
words: list[str] | Callable[[], list[str]],
words: Sequence[str] | Callable[[], Sequence[str]],
ignore_case: bool = False,
display_dict: Mapping[str, AnyFormattedText] | None = None,
meta_dict: Mapping[str, AnyFormattedText] | None = None,
Expand Down
Loading