Debian Codegraph @

jedi/third_party/typeshed/stdlib/readline.pyi

raw symbols SCIP
1 import sys
2 from _typeshed import StrOrBytesPath
3 from collections.abc import Callable, Sequence
4 from typing import Literal
5 from typing_extensions import TypeAlias
6
7 if sys.platform != "win32":
8 _Completer: TypeAlias = Callable[[str, int], str | None]
9 _CompDisp: TypeAlias = Callable[[str, Sequence[str], int], None]
10
11 def parse_and_bind(string: str, /) -> None: ...
12 def read_init_file(filename: StrOrBytesPath | None = None, /) -> None: ...
13 def get_line_buffer() -> str: ...
14 def insert_text(string: str, /) -> None: ...
15 def redisplay() -> None: ...
16 def read_history_file(filename: StrOrBytesPath | None = None, /) -> None: ...
17 def write_history_file(filename: StrOrBytesPath | None = None, /) -> None: ...
18 def append_history_file(nelements: int, filename: StrOrBytesPath | None = None, /) -> None: ...
19 def get_history_length() -> int: ...
20 def set_history_length(length: int, /) -> None: ...
21 def clear_history() -> None: ...
22 def get_current_history_length() -> int: ...
23 def get_history_item(index: int, /) -> str: ...
24 def remove_history_item(pos: int, /) -> None: ...
25 def replace_history_item(pos: int, line: str, /) -> None: ...
26 def add_history(string: str, /) -> None: ...
27 def set_auto_history(enabled: bool, /) -> None: ...
28 def set_startup_hook(function: Callable[[], object] | None = None, /) -> None: ...
29 def set_pre_input_hook(function: Callable[[], object] | None = None, /) -> None: ...
30 def set_completer(function: _Completer | None = None, /) -> None: ...
31 def get_completer() -> _Completer | None: ...
32 def get_completion_type() -> int: ...
33 def get_begidx() -> int: ...
34 def get_endidx() -> int: ...
35 def set_completer_delims(string: str, /) -> None: ...
36 def get_completer_delims() -> str: ...
37 def set_completion_display_matches_hook(function: _CompDisp | None = None, /) -> None: ...
38
39 if sys.version_info >= (3, 13):
40 backend: Literal["readline", "editline"]