def detach_tab_parse(func: str, rest: str) -> FuncArgsType: if rest not in ('new', 'ask'): log_error(f'Ignoring invalid detach_tab argument: {rest}') rest = 'new' return func, (rest,)
def abort() -> None: log_error(f'Symbol map: {val} is invalid, ignoring')
def abort(msg: str) -> None: log_error('Send text: {} is invalid ({}), ignoring'.format( val, msg))
def set_colors(func: str, rest: str) -> FuncArgsType: import shlex r = shlex.split(rest) if len(r) < 1: log_error('Too few arguments to set_colors function') return func, r
def remote_control(func: str, rest: str) -> FuncArgsType: func, args = shlex_parse(func, rest) if len(args) < 1: log_error('Too few arguments to remote_control function') return func, args
def detach_window_parse(func: str, rest: str) -> FuncArgsType: if rest not in ('new', 'new-tab', 'ask', 'tab-prev', 'tab-left', 'tab-right'): log_error(f'Ignoring invalid detach_window argument: {rest}') rest = 'new' return func, (rest, )
def abort(msg: str) -> None: log_error(f'Send text: {val} is invalid ({msg}), ignoring')
def abort() -> Dict[Tuple[int, int], str]: log_error(f'Symbol map: {val} is invalid, ignoring')
def remote_control(func: str, rest: str) -> FuncArgsType: import shlex r = shlex.split(rest) if len(r) < 1: log_error('Too few arguments to remote_control function') return func, r
def detach_window_parse(func: str, rest: str) -> FuncArgsType: if rest not in ('new', 'new-tab', 'ask'): log_error('Ignoring invalid detach_window argument: {}'.format(rest)) rest = 'new' return func, (rest, )
def dl(f: UnderlineCallback, *a: Any) -> None: try: f(ans, cell_width, *a) except Exception as e: log_error(f'Failed to render {f.__name__} at cell_width={cell_width} and cell_height={cell_height} with error: {e}')
def dl(f: UnderlineCallback, *a: Any) -> None: try: f(ans, cell_width, *a) except Exception as e: log_error('Failed to render {} at cell_width={} and cell_height={} with error: {}'.format( f.__name__, cell_width, cell_height, e))