"""
This type stub file was generated by pyright.
"""

import ast
from typing import Callable, Dict, Union
from prompt_toolkit.filters import Condition
from prompt_toolkit.layout.layout import FocusableElement
from IPython.utils.decorators import undoc

"""
Filters restricting scope of IPython Terminal shortcuts.
"""
@undoc
@Condition
def cursor_in_leading_ws():
    ...

def has_focus(value: FocusableElement): # -> Condition:
    """Wrapper around has_focus adding a nice `__name__` to tester function"""
    ...

@undoc
@Condition
def has_line_below() -> bool:
    ...

@undoc
@Condition
def is_cursor_at_the_end_of_line() -> bool:
    ...

@undoc
@Condition
def has_line_above() -> bool:
    ...

@Condition
def ebivim():
    ...

@Condition
def supports_suspend():
    ...

@Condition
def auto_match():
    ...

def all_quotes_paired(quote, buf):
    ...

_preceding_text_cache: Dict[Union[str, Callable], Condition] = ...
_following_text_cache: Dict[Union[str, Callable], Condition] = ...
def preceding_text(pattern: Union[str, Callable]): # -> Condition:
    ...

def following_text(pattern): # -> Condition:
    ...

@Condition
def not_inside_unclosed_string():
    ...

@Condition
def navigable_suggestions():
    ...

@Condition
def readline_like_completions():
    ...

@Condition
def is_windows_os():
    ...

default_buffer_focused = ...
KEYBINDING_FILTERS = ...
def eval_node(node: Union[ast.AST, None]): # -> None:
    ...

def filter_from_string(code: str): # -> None:
    ...

__all__ = ["KEYBINDING_FILTERS", "filter_from_string"]
