mirror of
https://github.com/bentoml/OpenLLM.git
synced 2026-01-31 19:02:10 -05:00
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
126 lines
3.5 KiB
Python
Generated
126 lines
3.5 KiB
Python
Generated
"""
|
|
This type stub file was generated by pyright.
|
|
"""
|
|
|
|
from typing import Union as UnionType
|
|
|
|
from IPython.core.interactiveshell import InteractiveShell
|
|
from prompt_toolkit.auto_suggest import AutoSuggestFromHistory
|
|
from prompt_toolkit.history import History
|
|
from prompt_toolkit.shortcuts import PromptSession
|
|
from pygments.style import Style
|
|
from traitlets import Integer
|
|
from traitlets import observe
|
|
|
|
from .shortcuts.auto_suggest import NavigableAutoSuggestFromHistory
|
|
|
|
"""IPython terminal interface using prompt_toolkit"""
|
|
PTK3 = ...
|
|
|
|
class _NoStyle(Style): ...
|
|
|
|
_style_overrides_light_bg = ...
|
|
_style_overrides_linux = ...
|
|
|
|
def get_default_editor(): ...
|
|
|
|
_use_simple_prompt = ...
|
|
|
|
def black_reformat_handler(text_before_cursor): # -> str:
|
|
"""
|
|
We do not need to protect against error,
|
|
this is taken care at a higher level where any reformat error is ignored.
|
|
Indeed we may call reformatting on incomplete code.
|
|
"""
|
|
...
|
|
|
|
def yapf_reformat_handler(text_before_cursor): ...
|
|
|
|
class PtkHistoryAdapter(History):
|
|
"""
|
|
Prompt toolkit has it's own way of handling history, Where it assumes it can
|
|
Push/pull from history.
|
|
|
|
"""
|
|
|
|
def __init__(self, shell) -> None: ...
|
|
def append_string(self, string): ...
|
|
def load_history_strings(self): ...
|
|
def store_string(self, string: str) -> None: ...
|
|
|
|
class TerminalInteractiveShell(InteractiveShell):
|
|
mime_renderers = ...
|
|
space_for_menu = Integer(6, help=...).tag(config=True)
|
|
pt_app: UnionType[PromptSession, None] = ...
|
|
auto_suggest: UnionType[AutoSuggestFromHistory, NavigableAutoSuggestFromHistory, None] = ...
|
|
debugger_history = ...
|
|
debugger_history_file = ...
|
|
simple_prompt = ...
|
|
@property
|
|
def debugger_cls(self): ...
|
|
|
|
confirm_exit = ...
|
|
editing_mode = ...
|
|
emacs_bindings_in_vi_insert_mode = ...
|
|
modal_cursor = ...
|
|
ttimeoutlen = ...
|
|
timeoutlen = ...
|
|
autoformatter = ...
|
|
auto_match = ...
|
|
mouse_support = ...
|
|
highlighting_style = ...
|
|
def refresh_style(self): ...
|
|
|
|
highlighting_style_overrides = ...
|
|
true_color = ...
|
|
editor = ...
|
|
prompts_class = ...
|
|
prompts = ...
|
|
term_title = ...
|
|
term_title_format = ...
|
|
display_completions = ...
|
|
highlight_matching_brackets = ...
|
|
extra_open_editor_shortcuts = ...
|
|
handle_return = ...
|
|
enable_history_search = ...
|
|
autosuggestions_provider = ...
|
|
shortcuts = ...
|
|
prompt_includes_vi_mode = ...
|
|
@observe("term_title")
|
|
def init_term_title(self, change=...): ...
|
|
def restore_term_title(self): ...
|
|
def init_display_formatter(self): ...
|
|
def init_prompt_toolkit_cli(self): ...
|
|
@property
|
|
def pt_complete_style(self): ...
|
|
@property
|
|
def color_depth(self): ...
|
|
def prompt_for_code(self): ...
|
|
def enable_win_unicode_console(self): ...
|
|
def init_io(self): ...
|
|
def init_magics(self): ...
|
|
def init_alias(self): ...
|
|
def __init__(self, *args, **kwargs) -> None: ...
|
|
def ask_exit(self): ...
|
|
|
|
rl_next_input = ...
|
|
def interact(self): ...
|
|
def mainloop(self): ...
|
|
|
|
_inputhook = ...
|
|
def inputhook(self, context): ...
|
|
|
|
active_eventloop = ...
|
|
def enable_gui(self, gui=...): ...
|
|
|
|
system = ...
|
|
def auto_rewrite_input(self, cmd): # -> None:
|
|
"""Overridden from the parent class to use fancy rewriting prompt"""
|
|
...
|
|
_prompts_before = ...
|
|
def switch_doctest_mode(self, mode): # -> None:
|
|
"""Switch prompts to classic for %doctest_mode"""
|
|
...
|
|
|
|
if __name__ == "__main__": ...
|