def _write_opts(opts):
            rv, any_slashes = join_options(opts)
            if any_slashes:
                any_prefix_is_slash[:] = [True]
            if not self.is_flag and not self.count:
                rv += ' ' + self.make_metavar()
            return rv
_write_opts(opts=['--help'], any_prefix_is_slash=[], self=<click.core.Option object at 0x7fe6e92cb160>, self.allow_from_autoenv=True, self.callback=<function Command.get_help_option.<locals>.show_help at 0x7fe6e6b9bee0>, self.confirmation_prompt=False, self.count=False, self.default=False, self.envvar=None, self.expose_value=False, self.flag_value=True, self.help='Show this message and exit.', self.hide_input=False, self.is_bool_flag=True, self.is_eager=True, self.is_flag=True, self.metavar=None, self.multiple=False, self.name='help', self.nargs=1, self.opts=['--help'], self.prompt=None, self.required=False, self.secondary_opts=[], self.show_default=False, self.type=BOOL)


def join_options(options):
    rv = []
    any_prefix_is_slash = False
    for opt in options:
        prefix = split_opt(opt)[0]
        if prefix == '/':
            any_prefix_is_slash = True
        rv.append((len(prefix), opt))
    rv.sort(key=lambda x: x[0])
    rv = ', '.join(x[1] for x in rv)
    return rv, any_prefix_is_slash
join_options(options=['--help'])


def write_heading(self, heading):
        self.write('%*s%s:\n' % (self.current_indent, '', heading))
write_heading(self=<click.formatting.HelpFormatter object at 0x7fe6e92cbe50>, heading='Options', self.buffer=['Usage: cli [OPTIONS]', '\n', '\n', '  Hello World!', '\n', '\n'], self.current_indent=0, self.indent_increment=2, self.width=80)

'Options'

['Usage: cli [OPTIONS]', '\n', '\n', '  Hello World!', '\n', '\n', 'Options:\n']

'Options'


def write_dl(self, rows, col_max=30, col_spacing=2):
        rows = list(rows)
        widths = measure_table(rows)
        if len(widths) != 2:
            raise TypeError('Expected two columns for definition list')
        first_col = min(widths[0], col_max) + col_spacing
        for first, second in iter_rows(rows, len(widths)):
            self.write('%*s%s' % (self.current_indent, '', first))
            if not second:
                self.write('\n')
                continue
            if term_len(first) <= first_col - col_spacing:
                self.write(' ' * (first_col - term_len(first)))
            else:
                self.write('\n')
                self.write(' ' * (first_col + self.current_indent))
            text_width = max(self.width - first_col - 2, 10)
            lines = iter(wrap_text(second, text_width).splitlines())
            if lines:
                self.write(next(lines) + '\n')
                for line in lines:
                    self.write('%*s%s\n' % (
                        first_col + self.current_indent, '', line))
            else:
                self.write('\n')
write_dl(self=<click.formatting.HelpFormatter object at 0x7fe6e92cbe50>, rows=[('--help', 'Show this message and exit.')], col_max=30, col_spacing=2, self.buffer=['Usage: cli [OPTIONS]', '\n', '\n', '  Hello World!', '\n', '\n', 'Options:\n'], self.current_indent=2, self.indent_increment=2, self.width=80)

['Usage: cli [OPTIONS]', '\n', '\n', '  Hello World!', '\n', '\n', 'Options:\n', '  --help']

['Usage: cli [OPTIONS]', '\n', '\n', '  Hello World!', '\n', '\n', 'Options:\n', '  --help', '  ']

['Usage: cli [OPTIONS]', '\n', '\n', '  Hello World!', '\n', '\n', 'Options:\n', '  --help', '  ', 'Show this message and exit.\n']


def measure_table(rows):
    widths = {}
    for row in rows:
        for idx, col in enumerate(row):
            widths[idx] = max(widths.get(idx, 0), term_len(col))
    return tuple(y for x, y in sorted(widths.items()))
measure_table(rows=[('--help', 'Show this message and exit.')])


def format_commands(self, ctx, formatter):
        rows = []
        for subcommand in self.list_commands(ctx):
            cmd = self.get_command(ctx, subcommand)
            if cmd is None:
                continue
            help = cmd.short_help or ''
            rows.append((subcommand, help))
        if rows:
            with formatter.section('Commands'):
                formatter.write_dl(rows)
format_commands(self=<click.core.Group object at 0x7fe6e92cba90>, ctx={parent=None, command=<click.core.Group object at 0x7fe6e92cba90>, info_name='cli', params={}, args=[], protected_args=[], obj=None, _meta={}, default_map=None, invoked_subcommand=None, terminal_width=None, max_content_width=None, allow_extra_args=True, allow_interspersed_args=False, ignore_unknown_options=False, help_option_names=['--help'], token_normalize_func=None, resilient_parsing=False, auto_envvar_prefix=None, color=None, _close_callbacks=[], _depth=2}, formatter={indent_increment=2, width=80, current_indent=0, buffer=['Usage: cli [OPTIONS] COMMAND [ARGS]...', '\n', '\n', '  This is the root.', '\n', '\n', 'Options:\n', '  --help', '  ', 'Show this message and exit.\n']}, self.__doc__='This is the root.', self.add_help_option=True, self.callback=<function test_basic_group.<locals>.cli at 0x7fe6e4dbeb80>, self.chain=False, self.commands={'subcommand': <click.core.Command object at 0x7fe6e92cb550>}, self.context_settings={}, self.epilog=None, self.help='This is the root.', self.invoke_without_command=False, self.name='cli', self.no_args_is_help=True, self.options_metavar='[OPTIONS]', self.params=[], self.result_callback=None, self.short_help='This is the root.', self.subcommand_metavar='COMMAND [ARGS]...')

{name='subcommand', context_settings={}, params=[], help='This is a subcommand.', epilog=None, options_metavar='[OPTIONS]', short_help='This is a subcommand.', add_help_option=True, __doc__='This is a subcommand.'}

{indent_increment=2, width=80, current_indent=2, buffer=['Usage: cli [OPTIONS] COMMAND [ARGS]...', '\n', '\n', '  This is the root.', '\n', '\n', 'Options:\n', '  --help', '  ', 'Show this message and exit.\n', '\n', 'Commands:\n']}

{indent_increment=2, width=80, current_indent=0, buffer=['Usage: cli [OPTIONS] COMMAND [ARGS]...', '\n', '\n', '  This is the root.', '\n', '\n', 'Options:\n', '  --help', '  ', 'Show this message and exit.\n', '\n', 'Commands:\n', '  subcommand', '  ', 'This is a subcommand.\n']}

[('subcommand', 'This is a subcommand.')]


def _process_result(value):
            if self.result_callback is not None:
                value = ctx.invoke(self.result_callback, value,
                                   **ctx.params)
            return value
_process_result(value=[], ctx={parent=None, command=<click.core.Group object at 0x7fe6e9370fa0>, info_name='cli', params={'input': <_io.TextIOWrapper encoding='utf-8'>}, args=[], protected_args=[], obj=None, _meta={}, default_map=None, invoked_subcommand=None, terminal_width=None, max_content_width=None, allow_extra_args=True, allow_interspersed_args=False, ignore_unknown_options=False, help_option_names=['--help'], token_normalize_func=None, resilient_parsing=False, auto_envvar_prefix=None, color=None, _close_callbacks=[<function safecall.<locals>.wrapper at 0x7fe6df02fe50>], _depth=2}, self=<click.core.Group object at 0x7fe6e9370fa0>, self.__doc__=None, self.add_help_option=True, self.callback=<function test_pipeline.<locals>.cli at 0x7fe6df02f550>, self.chain=True, self.commands={'uppercase': <click.core.Command object at 0x7fe6e92ac100>, 'strip': <click.core.Command object at 0x7fe6e92ac2b0>}, self.context_settings={}, self.epilog=None, self.help=None, self.invoke_without_command=True, self.name='cli', self.no_args_is_help=False, self.options_metavar='[OPTIONS]', self.params=[<click.core.Option object at 0x7fe6e92aceb0>], self.result_callback=<function test_pipeline.<locals>.process_pipeline at 0x7fe6df02f310>, self.short_help=None, self.subcommand_metavar='COMMAND1 [ARGS]... [COMMAND2 [ARGS]...]...')


def _process_args_for_options(self, state):
        while state.rargs:
            arg = state.rargs.pop(0)
            arglen = len(arg)
            if arg == '--':
                return
            elif arg[:1] in self._opt_prefixes and arglen > 1:
                self._process_opts(arg, state)
            elif self.allow_interspersed_args:
                state.largs.append(arg)
            else:
                state.rargs.insert(0, arg)
                return
_process_args_for_options(self=<click.parser.OptionParser object at 0x7fe6e94658b0>, state={opts={}, largs=[], rargs=['--foo='], order=[]}, self._args=[], self._long_opt={'--foo': <click.parser.Option object at 0x7fe6e9683c70>, '--help': <click.parser.Option object at 0x7fe6e9683ca0>}, self._opt_prefixes={'--', '-'}, self._short_opt={}, self.allow_interspersed_args=True, self.ctx=<click.core.Context object at 0x7fe6e93ba0a0>, self.ignore_unknown_options=False)

{opts={'foo': ''}, largs=[], rargs=[], order=[<click.core.Option object at 0x7fe6e9465040>]}


def memo(ctx, value):
        called.append(value)
        return value
memo(ctx={parent=None, command=<click.core.Command object at 0x7fe6e973ed60>, info_name='cli', params={}, args=[], protected_args=[], obj=None, _meta={}, default_map=None, invoked_subcommand=None, terminal_width=None, max_content_width=None, allow_extra_args=False, allow_interspersed_args=True, ignore_unknown_options=False, help_option_names=['--help'], token_normalize_func=None, resilient_parsing=False, auto_envvar_prefix=None, color=None, _close_callbacks=[], _depth=2}, value='eager2', called=[])


def command_path(self):
        rv = ''
        if self.info_name is not None:
            rv = self.info_name
        if self.parent is not None:
            rv = self.parent.command_path + ' ' + rv
        return rv.lstrip()
command_path(self=<click.core.Context object at 0x7fe6e973e3d0>, self._close_callbacks=[], self._depth=2, self._meta={}, self.allow_extra_args=True, self.allow_interspersed_args=False, self.args=[], self.auto_envvar_prefix=None, self.color=None, self.command=<click.core.Group object at 0x7fe6e973eb80>, self.default_map=None, self.help_option_names=['--help'], self.ignore_unknown_options=False, self.info_name='cli', self.invoked_subcommand='*', self.max_content_width=None, self.obj=None, self.params={}, self.parent=None, self.protected_args=[], self.resilient_parsing=False, self.terminal_width=None, self.token_normalize_func=None)


def resolve_command(self, ctx, args):
        cmd_name = make_str(args[0])
        original_cmd_name = cmd_name
        cmd = self.get_command(ctx, cmd_name)
        if cmd is None and ctx.token_normalize_func is not None:
            cmd_name = ctx.token_normalize_func(cmd_name)
            cmd = self.get_command(ctx, cmd_name)
        if cmd is None:
            if split_opt(cmd_name)[0]:
                self.parse_args(ctx, ctx.args)
            ctx.fail('No such command "%s".' % original_cmd_name)
        return cmd_name, cmd, args[1:]
resolve_command(self=<click.core.Group object at 0x7fe6e9562310>, ctx={parent=None, command=<click.core.Group object at 0x7fe6e9562310>, info_name='cli', params={'obj': 'obj1'}, args=[], protected_args=[], obj=None, _meta={}, default_map=None, invoked_subcommand=None, terminal_width=None, max_content_width=None, allow_extra_args=True, allow_interspersed_args=False, ignore_unknown_options=False, help_option_names=['--help'], token_normalize_func=None, resilient_parsing=False, auto_envvar_prefix=None, color=None, _close_callbacks=[], _depth=2}, args=['move'], self.__doc__=None, self.add_help_option=True, self.callback=<function test_group_with_args.<locals>.cli at 0x7fe6dd873550>, self.chain=False, self.commands={'move': <click.core.Command object at 0x7fe6e9562880>}, self.context_settings={}, self.epilog=None, self.help=None, self.invoke_without_command=False, self.name='cli', self.no_args_is_help=True, self.options_metavar='[OPTIONS]', self.params=[<click.core.Argument object at 0x7fe6e9562970>], self.result_callback=None, self.short_help=None, self.subcommand_metavar='COMMAND [ARGS]...')

{name='move', context_settings={}, params=[], help=None, epilog=None, options_metavar='[OPTIONS]', short_help=None, add_help_option=True, __doc__=None}


{name='move', context_settings={}, params=[], help=None, epilog=None, options_metavar='[OPTIONS]', short_help=None, add_help_option=True, __doc__=None}


def ensure_object(self, object_type):
        rv = self.find_object(object_type)
        if rv is None:
            self.obj = rv = object_type()
        return rv
ensure_object(self=<click.core.Context object at 0x7fe6e93405b0>, object_type=<class 'test_context.test_ensure_context_objects.<locals>.Foo'>, self._close_callbacks=[], self._depth=3, self._meta={}, self.allow_extra_args=True, self.allow_interspersed_args=False, self.args=[], self.auto_envvar_prefix=None, self.color=None, self.command=<click.core.Group object at 0x7fe6e9340880>, self.default_map=None, self.help_option_names=['--help'], self.ignore_unknown_options=False, self.info_name='cli', self.invoked_subcommand='test', self.max_content_width=None, self.obj=None, self.params={}, self.parent=None, self.protected_args=[], self.resilient_parsing=False, self.terminal_width=None, self.token_normalize_func=None)

<test_context.test_ensure_context_objects.<locals>.Foo object at 0x7fe6e9340700>


def find_object(self, object_type):
        node = self
        while node is not None:
            if isinstance(node.obj, object_type):
                return node.obj
            node = node.parent
find_object(self=<click.core.Context object at 0x7fe6e93405b0>, object_type=<class 'test_context.test_ensure_context_objects.<locals>.Foo'>, self._close_callbacks=[], self._depth=3, self._meta={}, self.allow_extra_args=True, self.allow_interspersed_args=False, self.args=[], self.auto_envvar_prefix=None, self.color=None, self.command=<click.core.Group object at 0x7fe6e9340880>, self.default_map=None, self.help_option_names=['--help'], self.ignore_unknown_options=False, self.info_name='cli', self.invoked_subcommand='test', self.max_content_width=None, self.obj=None, self.params={}, self.parent=None, self.protected_args=[], self.resilient_parsing=False, self.terminal_width=None, self.token_normalize_func=None)

{parent=None, command=<click.core.Group object at 0x7fe6e9340880>, info_name='cli', params={}, args=[], protected_args=[], obj=None, _meta={}, default_map=None, invoked_subcommand='test', terminal_width=None, max_content_width=None, allow_extra_args=True, allow_interspersed_args=False, ignore_unknown_options=False, help_option_names=['--help'], token_normalize_func=None, resilient_parsing=False, auto_envvar_prefix=None, color=None, _close_callbacks=[], _depth=3}


def indent_only(self, text):
        rv = []
        for idx, line in enumerate(text.splitlines()):
            indent = self.initial_indent
            if idx > 0:
                indent = self.subsequent_indent
            rv.append(indent + line)
        return '\n'.join(rv)
indent_only(self=<click._textwrap.TextWrapper object at 0x7fe6e93404f0>, text='This is\na paragraph\nwithout rewrapping.', self.break_long_words=True, self.break_on_hyphens=True, self.drop_whitespace=True, self.expand_tabs=True, self.fix_sentence_endings=False, self.initial_indent='  ', self.max_lines=None, self.placeholder=' [...]', self.replace_whitespace=False, self.subsequent_indent='  ', self.tabsize=8, self.width=58)

['  This is', '  a paragraph', '  without rewrapping.']


def _match_short_opt(self, arg, state):
        stop = False
        i = 1
        prefix = arg[0]
        unknown_options = []
        for ch in arg[1:]:
            opt = normalize_opt(prefix + ch, self.ctx)
            option = self._short_opt.get(opt)
            i += 1
            if not option:
                if self.ignore_unknown_options:
                    unknown_options.append(ch)
                    continue
                raise NoSuchOption(opt)
            if option.takes_value:
                if i < len(arg):
                    state.rargs.insert(0, arg[i:])
                    stop = True
                nargs = option.nargs
                if len(state.rargs) < nargs:
                    _error_opt_args(nargs, opt)
                elif nargs == 1:
                    value = state.rargs.pop(0)
                else:
                    value = tuple(state.rargs[:nargs])
                    del state.rargs[:nargs]
            else:
                value = None
            option.process(value, state)
            if stop:
                break
        if self.ignore_unknown_options and unknown_options:
            state.largs.append(prefix + ''.join(unknown_options))
_match_short_opt(self=<click.parser.OptionParser object at 0x7fe6e9563820>, arg='-m', state={opts={}, largs=[], rargs=['foo', '-mbar'], order=[]}, self._args=[], self._long_opt={'--message': <click.parser.Option object at 0x7fe6e95632b0>, '--help': <click.parser.Option object at 0x7fe6e9563940>}, self._opt_prefixes={'--', '-'}, self._short_opt={'-m': <click.parser.Option object at 0x7fe6e95632b0>}, self.allow_interspersed_args=True, self.ctx=<click.core.Context object at 0x7fe6e96d9130>, self.ignore_unknown_options=False)

{opts={}, largs=[], rargs=['-mbar'], order=[]}

{opts={'message': ['foo']}, largs=[], rargs=['-mbar'], order=[<click.core.Option object at 0x7fe6e96d9dc0>]}

{_short_opts=['-m'], _long_opts=['--message'], prefixes={'--', '-'}, dest='message', action='append', nargs=1, const=None, obj=<click.core.Option object at 0x7fe6e96d9dc0>}


opt = normalize_opt(prefix + ch, self.ctx)


def render_progress(self):
        from .termui import get_terminal_size
        nl = False
        if self.is_hidden:
            buf = [self.label]
            nl = True
        else:
            buf = []
            if self.autowidth:
                old_width = self.width
                self.width = 0
                clutter_length = term_len(self.format_progress_line())
                new_width = max(0, get_terminal_size()[0] - clutter_length)
                if new_width < old_width:
                    buf.append(BEFORE_BAR)
                    buf.append(' ' * self.max_width)
                    self.max_width = new_width
                self.width = new_width
            clear_width = self.width
            if self.max_width is not None:
                clear_width = self.max_width
            buf.append(BEFORE_BAR)
            line = self.format_progress_line()
            line_len = term_len(line)
            if self.max_width is None or self.max_width < line_len:
                self.max_width = line_len
            buf.append(line)
            buf.append(' ' * (clear_width - line_len))
        line = ''.join(buf)
        if line != self._last_line:
            self._last_line = line
            echo(line, file=self.file, color=self.color, nl=nl)
            self.file.flush()
render_progress(self=<click._termui_impl.ProgressBar object at 0x7fe6e973e940>, self._last_line=None, self.autowidth=False, self.avg=[], self.bar_template='%(label)s  [%(bar)s]  %(info)s', self.color=None, self.current_item=None, self.empty_char='-', self.entered=True, self.eta_known=False, self.file=<_io.TextIOWrapper encoding='utf-8'>, self.fill_char='

<tuple_iterator object at 0x7fe6e973e190>

<function get_terminal_size at 0x7fe6e96c4b80>


def format_progress_line(self):
        show_percent = self.show_percent
        info_bits = []
        if self.length_known:
            bar_length = int(self.pct * self.width)
            bar = self.fill_char * bar_length
            bar += self.empty_char * (self.width - bar_length)
            if show_percent is None:
                show_percent = not self.show_pos
        else:
            if self.finished:
                bar = self.fill_char * self.width
            else:
                bar = list(self.empty_char * (self.width or 1))
                if self.time_per_iteration != 0:
                    bar[int((math.cos(self.pos * self.time_per_iteration)
                        / 2.0 + 0.5) * self.width)] = self.fill_char
                bar = ''.join(bar)
        if self.show_pos:
            info_bits.append(self.format_pos())
        if show_percent:
            info_bits.append(self.format_pct())
        if self.show_eta and self.eta_known and not self.finished:
            info_bits.append(self.format_eta())
        if self.item_show_func is not None:
            item_info = self.item_show_func(self.current_item)
            if item_info is not None:
                info_bits.append(item_info)
        return (self.bar_template % {
            'label': self.label,
            'bar': bar,
            'info': self.info_sep.join(info_bits)
        }).rstrip()
format_progress_line(self=<click._termui_impl.ProgressBar object at 0x7fe6e973e940>, self._last_line=None, self.autowidth=False, self.avg=[], self.bar_template='%(label)s  [%(bar)s]  %(info)s', self.color=None, self.current_item=None, self.empty_char='-', self.entered=True, self.eta_known=False, self.file=<_io.TextIOWrapper encoding='utf-8'>, self.fill_char='


def next(self):
        if self.is_hidden:
            return next(self.iter)
        try:
            rv = next(self.iter)
            self.current_item = rv
        except StopIteration:
            self.finish()
            self.render_progress()
            raise StopIteration()
        else:
            self.update(1)
            return rv
next(self=<click._termui_impl.ProgressBar object at 0x7fe6e973e940>, self._last_line='\r\x1b[?25l    padded line  [------------------------------------]    0%', self.autowidth=False, self.avg=[], self.bar_template='%(label)s  [%(bar)s]  %(info)s', self.color=None, self.current_item=None, self.empty_char='-', self.entered=True, self.eta_known=False, self.file=<_io.TextIOWrapper encoding='utf-8'>, self.fill_char='


def make_step(self, n_steps):
        self.pos += n_steps
        if self.length_known and self.pos >= self.length:
            self.finished = True
        if (time.time() - self.last_eta) < 1.0:
            return
        self.last_eta = time.time()
        self.avg = self.avg[-6:] + [-(self.start - time.time()) / (self.pos)]
        self.eta_known = self.length_known
make_step(self=<click._termui_impl.ProgressBar object at 0x7fe6e973e940>, n_steps=1, self._last_line='\r\x1b[?25l    padded line  [------------------------------------]    0%', self.autowidth=False, self.avg=[], self.bar_template='%(label)s  [%(bar)s]  %(info)s', self.color=None, self.current_item=0, self.empty_char='-', self.entered=True, self.eta_known=False, self.file=<_io.TextIOWrapper encoding='utf-8'>, self.fill_char='


def test():
        i = click.get_binary_stream('stdin')
        o = click.get_binary_stream('stdout')
        while 1:
            chunk = i.read(4096)
            if not chunk:
                break
            o.write(chunk)
            o.flush()
test()


def _build_prompt(text, suffix, show_default=False, default=None):
    prompt = text
    if default is not None and show_default:
        prompt = '%s [%s]' % (prompt, default)
    return prompt + suffix
_build_prompt(text='Foo', suffix=': ', show_default=True, default=None)

'Foo'

'Foo'

Prompt: 'Foo'


def test_echo_via_pager(monkeypatch, capfd, cat):
    monkeypatch.setitem(os.environ, 'PAGER', cat)
    monkeypatch.setattr(click._termui_impl, 'isatty', lambda x: True)
    click.echo_via_pager('haha')
    out, err = capfd.readouterr()
    assert out == 'haha\n'
test_echo_via_pager(monkeypatch={_setattr=[], _setitem=[], _cwd=None, _savesyspath=None}, capfd={request=<SubRequest 'capfd' for <Function test_echo_via_pager[cat]>>, _capture=<MultiCapture out=<FDCapture 1 oldfd=6 _state='started' tmpfile=<_io.TextIOWrapper name="<_io.FileIO name=7 mode='rb+' closefd=True>" mode='r+' encoding='utf-8'>> err=<FDCapture 2 oldfd=8 _state='started' tmpfile=<_io.TextIOWrapper name="<_io.FileIO name=9 mode='rb+' closefd=True>" mode='r+' encoding='utf-8'>> in_=None _state='started' _in_suspended=False>, _captured_out='', _captured_err=''}, cat='cat')

{_setattr=[], _setitem=[(environ({'SHELL': '/bin/bash', 'LSCOLORS': 'Gxfxcxdxbxegedabagacad', 'USER_ZDOTDIR': '/home/XXX', 'COLORTERM': 'truecolor', 'LESS': '-R', 'TERM_PROGRAM_VERSION': '3.2a', 'GVM_VERSION': '1.0.22', 'CONDA_EXE': '/local/rcs/XXX/miniforge3/bin/conda', '_CE_M': '', 'TMUX': '/tmp/tmux-19200/default,59951,3', 'PKG_CONFIG_PATH': '/home/XXX/.gvm/pkgsets/go1.19.1/global/overlay/lib/pkgconfig:/home/XXX/.gvm/pkgsets/go1.19.1/global/overlay/lib/pkgconfig:', '_P9K_TTY': '/dev/pts/20', 'GVM_PATH_BACKUP': '/home/XXX/.gvm/bin:/local/rcs/XXX/miniforge3/envs/mal/bin:/local/rcs/XXX/miniforge3/condabin:/home/XXX/.gdrive-downloader:/local/arise/XXX/miniforge3/bin:/home/XXX/.gvm/pkgsets/go1.19.1/global/bin:/home/XXX/.gvm/gos/go1.19.1/bin:/home/XXX/.gvm/pkgsets/go1.19.1/global/overlay/bin:/home/XXX/.gvm/bin:/home/XXX/.vscode-server/cli/servers/Stable-31c37ee8f63491495ac49e43b8544550fbae4533/server/bin/remote-cli:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/XXX/.local/bin:/home/XXX/.local/bin:/home/XXX/.local/bin', 'P9K_TTY': 'old', 'LC_FIG_SET_PARENT': '4c022497-5122-4b80-b325-c89bab32302a', 'PWD': '/local/rcs/XXX/code/pytrace-collector/logs/pypibugs/tried/MrTango+click/MrTango+click', 'LOGNAME': 'XXX', 'XDG_SESSION_TYPE': 'tty', 'CONDA_PREFIX': '/local/rcs/XXX/miniforge3/envs/MrTango+click', 'VSCODE_GIT_ASKPASS_NODE': '/home/XXX/.vscode-server/cli/servers/Stable-31c37ee8f63491495ac49e43b8544550fbae4533/server/node', 'MOTD_SHOWN': 'pam', 'VSCODE_INJECTION': '1', 'GVM_OVERLAY_PREFIX': '/home/XXX/.gvm/pkgsets/go1.19.1/global/overlay', 'HOME': '/home/XXX', 'LANG': 'en_US.UTF-8', 'DYLD_LIBRARY_PATH': '/home/XXX/.gvm/pkgsets/go1.19.1/global/overlay/lib:/home/XXX/.gvm/pkgsets/go1.19.1/global/overlay/lib', 'LS_COLORS': 'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:', 'gvm_pkgset_name': 'global', 'SSL_CERT_DIR': '/usr/lib/ssl/certs', 'CONDA_PROMPT_MODIFIER': '(MrTango+click) ', 'GIT_ASKPASS': '/home/XXX/.vscode-server/cli/servers/Stable-31c37ee8f63491495ac49e43b8544550fbae4533/server/extensions/git/dist/askpass.sh', 'GVM_ROOT': '/home/XXX/.gvm', 'SSH_CONNECTION': '127.0.0.1 39996 127.0.0.1 22', 'GOROOT': '/home/XXX/.gvm/gos/go1.19.1', 'NVM_DIR': '/local/rcs/XXX/.nvm', 'VSCODE_GIT_ASKPASS_EXTRA_ARGS': '', 'XDG_SESSION_CLASS': 'user', 'PYTHONPATH': ':/local/rcs/XXX/code/pytrace-collector:/local/rcs/XXX/code/pytrace-collector/logs/pypibugs/tried/MrTango+click/MrTango+click', 'TERM': 'screen', 'ZSH': '/home/XXX/.oh-my-zsh', '_CE_CONDA': '', 'VSCODE_NONCE': 'd0bc7031-48a3-4719-8bb5-ef236ddd0016', 'ZDOTDIR': '/home/XXX', 'USER': 'XXX', 'TMUX_PANE': '%3', 'VSCODE_GIT_IPC_HANDLE': '/run/user/19200/vscode-git-13d67c6199.sock', 'CONDA_SHLVL': '3', 'SHLVL': '3', 'PAGER': 'cat', '_P9K_SSH_TTY': '/dev/pts/20', 'XDG_SESSION_ID': '43', 'CONDA_PYTHON_EXE': '/local/rcs/XXX/miniforge3/bin/python', 'LD_LIBRARY_PATH': '/home/XXX/.gvm/pkgsets/go1.19.1/global/overlay/lib:/home/XXX/.gvm/pkgsets/go1.19.1/global/overlay/lib', 'XDG_RUNTIME_DIR': '/run/user/19200', 'SSL_CERT_FILE': '/usr/lib/ssl/certs/ca-certificates.crt', 'SSH_CLIENT': '127.0.0.1 46946 22', 'CONDA_DEFAULT_ENV': 'MrTango+click', 'P9K_SSH': '1', 'LC_ALL': 'en_US.UTF-8', 'VSCODE_GIT_ASKPASS_MAIN': '/home/XXX/.vscode-server/cli/servers/Stable-31c37ee8f63491495ac49e43b8544550fbae4533/server/extensions/git/dist/askpass-main.js', 'XDG_DATA_DIRS': '/usr/local/share:/usr/share:/var/lib/snapd/desktop', 'BROWSER': '/home/XXX/.vscode-server/cli/servers/Stable-31c37ee8f63491495ac49e43b8544550fbae4533/server/bin/helpers/browser.sh', 'PATH': '/home/XXX/.gdrive-downloader:/local/arise/XXX/miniforge3/bin:/home/XXX/.gvm/pkgsets/go1.19.1/global/bin:/home/XXX/.gvm/gos/go1.19.1/bin:/home/XXX/.gvm/pkgsets/go1.19.1/global/overlay/bin:/home/XXX/.gvm/bin:/local/rcs/XXX/miniforge3/envs/MrTango+click/bin:/local/rcs/XXX/miniforge3/condabin:/home/XXX/.gdrive-downloader:/local/arise/XXX/miniforge3/bin:/home/XXX/.vscode-server/cli/servers/Stable-31c37ee8f63491495ac49e43b8544550fbae4533/server/bin/remote-cli:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/XXX/.local/bin:/home/XXX/.local/bin', 'DBUS_SESSION_BUS_ADDRESS': 'unix:path=/run/user/19200/bus', 'gvm_go_name': 'go1.19.1', 'CONDA_PREFIX_1': '/local/rcs/XXX/miniforge3', 'CONDA_PREFIX_2': '/local/rcs/XXX/miniforge3/envs/mal', 'OLDPWD': '/local/rcs/XXX/code/pytrace-collector', 'GOPATH': '/home/XXX/.gvm/pkgsets/go1.19.1/global', 'TERM_PROGRAM': 'tmux', 'VSCODE_IPC_HOOK_CLI': '/run/user/19200/vscode-ipc-518d6355-acaf-4714-a359-be3fe9f21e09.sock', '_': '/local/rcs/XXX/miniforge3/envs/MrTango+click/bin/python', 'PYTEST_CURRENT_TEST': 'tests/test_utils.py::test_echo_via_pager[cat] (call)'}), 'PAGER', 'less')], _cwd=None, _savesyspath=None}

{_setattr=[(<module 'click._termui_impl' from '/local/rcs/XXX/code/pytrace-collector/logs/pypibugs/tried/MrTango+click/MrTango+click/click/_termui_impl.py'>, 'isatty', <function isatty at 0x7fe6e9757e50>)], _setitem=[(environ({'SHELL': '/bin/bash', 'LSCOLORS': 'Gxfxcxdxbxegedabagacad', 'USER_ZDOTDIR': '/home/XXX', 'COLORTERM': 'truecolor', 'LESS': '-R', 'TERM_PROGRAM_VERSION': '3.2a', 'GVM_VERSION': '1.0.22', 'CONDA_EXE': '/local/rcs/XXX/miniforge3/bin/conda', '_CE_M': '', 'TMUX': '/tmp/tmux-19200/default,59951,3', 'PKG_CONFIG_PATH': '/home/XXX/.gvm/pkgsets/go1.19.1/global/overlay/lib/pkgconfig:/home/XXX/.gvm/pkgsets/go1.19.1/global/overlay/lib/pkgconfig:', '_P9K_TTY': '/dev/pts/20', 'GVM_PATH_BACKUP': '/home/XXX/.gvm/bin:/local/rcs/XXX/miniforge3/envs/mal/bin:/local/rcs/XXX/miniforge3/condabin:/home/XXX/.gdrive-downloader:/local/arise/XXX/miniforge3/bin:/home/XXX/.gvm/pkgsets/go1.19.1/global/bin:/home/XXX/.gvm/gos/go1.19.1/bin:/home/XXX/.gvm/pkgsets/go1.19.1/global/overlay/bin:/home/XXX/.gvm/bin:/home/XXX/.vscode-server/cli/servers/Stable-31c37ee8f63491495ac49e43b8544550fbae4533/server/bin/remote-cli:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/XXX/.local/bin:/home/XXX/.local/bin:/home/XXX/.local/bin', 'P9K_TTY': 'old', 'LC_FIG_SET_PARENT': '4c022497-5122-4b80-b325-c89bab32302a', 'PWD': '/local/rcs/XXX/code/pytrace-collector/logs/pypibugs/tried/MrTango+click/MrTango+click', 'LOGNAME': 'XXX', 'XDG_SESSION_TYPE': 'tty', 'CONDA_PREFIX': '/local/rcs/XXX/miniforge3/envs/MrTango+click', 'VSCODE_GIT_ASKPASS_NODE': '/home/XXX/.vscode-server/cli/servers/Stable-31c37ee8f63491495ac49e43b8544550fbae4533/server/node', 'MOTD_SHOWN': 'pam', 'VSCODE_INJECTION': '1', 'GVM_OVERLAY_PREFIX': '/home/XXX/.gvm/pkgsets/go1.19.1/global/overlay', 'HOME': '/home/XXX', 'LANG': 'en_US.UTF-8', 'DYLD_LIBRARY_PATH': '/home/XXX/.gvm/pkgsets/go1.19.1/global/overlay/lib:/home/XXX/.gvm/pkgsets/go1.19.1/global/overlay/lib', 'LS_COLORS': 'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:', 'gvm_pkgset_name': 'global', 'SSL_CERT_DIR': '/usr/lib/ssl/certs', 'CONDA_PROMPT_MODIFIER': '(MrTango+click) ', 'GIT_ASKPASS': '/home/XXX/.vscode-server/cli/servers/Stable-31c37ee8f63491495ac49e43b8544550fbae4533/server/extensions/git/dist/askpass.sh', 'GVM_ROOT': '/home/XXX/.gvm', 'SSH_CONNECTION': '127.0.0.1 39996 127.0.0.1 22', 'GOROOT': '/home/XXX/.gvm/gos/go1.19.1', 'NVM_DIR': '/local/rcs/XXX/.nvm', 'VSCODE_GIT_ASKPASS_EXTRA_ARGS': '', 'XDG_SESSION_CLASS': 'user', 'PYTHONPATH': ':/local/rcs/XXX/code/pytrace-collector:/local/rcs/XXX/code/pytrace-collector/logs/pypibugs/tried/MrTango+click/MrTango+click', 'TERM': 'screen', 'ZSH': '/home/XXX/.oh-my-zsh', '_CE_CONDA': '', 'VSCODE_NONCE': 'd0bc7031-48a3-4719-8bb5-ef236ddd0016', 'ZDOTDIR': '/home/XXX', 'USER': 'XXX', 'TMUX_PANE': '%3', 'VSCODE_GIT_IPC_HANDLE': '/run/user/19200/vscode-git-13d67c6199.sock', 'CONDA_SHLVL': '3', 'SHLVL': '3', 'PAGER': 'cat', '_P9K_SSH_TTY': '/dev/pts/20', 'XDG_SESSION_ID': '43', 'CONDA_PYTHON_EXE': '/local/rcs/XXX/miniforge3/bin/python', 'LD_LIBRARY_PATH': '/home/XXX/.gvm/pkgsets/go1.19.1/global/overlay/lib:/home/XXX/.gvm/pkgsets/go1.19.1/global/overlay/lib', 'XDG_RUNTIME_DIR': '/run/user/19200', 'SSL_CERT_FILE': '/usr/lib/ssl/certs/ca-certificates.crt', 'SSH_CLIENT': '127.0.0.1 46946 22', 'CONDA_DEFAULT_ENV': 'MrTango+click', 'P9K_SSH': '1', 'LC_ALL': 'en_US.UTF-8', 'VSCODE_GIT_ASKPASS_MAIN': '/home/XXX/.vscode-server/cli/servers/Stable-31c37ee8f63491495ac49e43b8544550fbae4533/server/extensions/git/dist/askpass-main.js', 'XDG_DATA_DIRS': '/usr/local/share:/usr/share:/var/lib/snapd/desktop', 'BROWSER': '/home/XXX/.vscode-server/cli/servers/Stable-31c37ee8f63491495ac49e43b8544550fbae4533/server/bin/helpers/browser.sh', 'PATH': '/home/XXX/.gdrive-downloader:/local/arise/XXX/miniforge3/bin:/home/XXX/.gvm/pkgsets/go1.19.1/global/bin:/home/XXX/.gvm/gos/go1.19.1/bin:/home/XXX/.gvm/pkgsets/go1.19.1/global/overlay/bin:/home/XXX/.gvm/bin:/local/rcs/XXX/miniforge3/envs/MrTango+click/bin:/local/rcs/XXX/miniforge3/condabin:/home/XXX/.gdrive-downloader:/local/arise/XXX/miniforge3/bin:/home/XXX/.vscode-server/cli/servers/Stable-31c37ee8f63491495ac49e43b8544550fbae4533/server/bin/remote-cli:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/XXX/.local/bin:/home/XXX/.local/bin', 'DBUS_SESSION_BUS_ADDRESS': 'unix:path=/run/user/19200/bus', 'gvm_go_name': 'go1.19.1', 'CONDA_PREFIX_1': '/local/rcs/XXX/miniforge3', 'CONDA_PREFIX_2': '/local/rcs/XXX/miniforge3/envs/mal', 'OLDPWD': '/local/rcs/XXX/code/pytrace-collector', 'GOPATH': '/home/XXX/.gvm/pkgsets/go1.19.1/global', 'TERM_PROGRAM': 'tmux', 'VSCODE_IPC_HOOK_CLI': '/run/user/19200/vscode-ipc-518d6355-acaf-4714-a359-be3fe9f21e09.sock', '_': '/local/rcs/XXX/miniforge3/envs/MrTango+click/bin/python', 'PYTEST_CURRENT_TEST': 'tests/test_utils.py::test_echo_via_pager[cat] (call)'}), 'PAGER', 'less')], _cwd=None, _savesyspath=None}


def _pipepager(text, cmd, color):
    import subprocess
    env = dict(os.environ)
    cmd_detail = cmd.rsplit('/', 1)[-1].split()
    if color is None and cmd_detail[0] == 'less':
        less_flags = os.environ.get('LESS', '') + ' '.join(cmd_detail[1:])
        if not less_flags:
            env['LESS'] = '-R'
            color = True
        elif 'r' in less_flags or 'R' in less_flags:
            color = True
    if not color:
        text = strip_ansi(text)
    c = subprocess.Popen(cmd, shell=True, stdin=subprocess.PIPE,
                         env=env)
    encoding = get_best_encoding(c.stdin)
    try:
        c.stdin.write(text.encode(encoding, 'replace'))
        c.stdin.close()
    except (IOError, KeyboardInterrupt):
        pass
    while True:
        try:
            c.wait()
        except KeyboardInterrupt:
            pass
        else:
            break
_pipepager(text='haha\n', cmd='cat', color=None)

'haha\n'

{'SHELL': '/bin/bash', 'LSCOLORS': 'Gxfxcxdxbxegedabagacad', 'USER_ZDOTDIR': '/home/XXX', 'COLORTERM': 'truecolor', 'LESS': '-R', 'TERM_PROGRAM_VERSION': '3.2a', 'GVM_VERSION': '1.0.22', 'CONDA_EXE': '/local/rcs/XXX/miniforge3/bin/conda', '_CE_M': '', 'TMUX': '/tmp/tmux-19200/default,59951,3', 'PKG_CONFIG_PATH': '/home/XXX/.gvm/pkgsets/go1.19.1/global/overlay/lib/pkgconfig:/home/XXX/.gvm/pkgsets/go1.19.1/global/overlay/lib/pkgconfig:', '_P9K_TTY': '/dev/pts/20', 'GVM_PATH_BACKUP': '/home/XXX/.gvm/bin:/local/rcs/XXX/miniforge3/envs/mal/bin:/local/rcs/XXX/miniforge3/condabin:/home/XXX/.gdrive-downloader:/local/arise/XXX/miniforge3/bin:/home/XXX/.gvm/pkgsets/go1.19.1/global/bin:/home/XXX/.gvm/gos/go1.19.1/bin:/home/XXX/.gvm/pkgsets/go1.19.1/global/overlay/bin:/home/XXX/.gvm/bin:/home/XXX/.vscode-server/cli/servers/Stable-31c37ee8f63491495ac49e43b8544550fbae4533/server/bin/remote-cli:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/XXX/.local/bin:/home/XXX/.local/bin:/home/XXX/.local/bin', 'P9K_TTY': 'old', 'LC_FIG_SET_PARENT': '4c022497-5122-4b80-b325-c89bab32302a', 'PWD': '/local/rcs/XXX/code/pytrace-collector/logs/pypibugs/tried/MrTango+click/MrTango+click', 'LOGNAME': 'XXX', 'XDG_SESSION_TYPE': 'tty', 'CONDA_PREFIX': '/local/rcs/XXX/miniforge3/envs/MrTango+click', 'VSCODE_GIT_ASKPASS_NODE': '/home/XXX/.vscode-server/cli/servers/Stable-31c37ee8f63491495ac49e43b8544550fbae4533/server/node', 'MOTD_SHOWN': 'pam', 'VSCODE_INJECTION': '1', 'GVM_OVERLAY_PREFIX': '/home/XXX/.gvm/pkgsets/go1.19.1/global/overlay', 'HOME': '/home/XXX', 'LANG': 'en_US.UTF-8', 'DYLD_LIBRARY_PATH': '/home/XXX/.gvm/pkgsets/go1.19.1/global/overlay/lib:/home/XXX/.gvm/pkgsets/go1.19.1/global/overlay/lib', 'LS_COLORS': 'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:', 'gvm_pkgset_name': 'global', 'SSL_CERT_DIR': '/usr/lib/ssl/certs', 'CONDA_PROMPT_MODIFIER': '(MrTango+click) ', 'GIT_ASKPASS': '/home/XXX/.vscode-server/cli/servers/Stable-31c37ee8f63491495ac49e43b8544550fbae4533/server/extensions/git/dist/askpass.sh', 'GVM_ROOT': '/home/XXX/.gvm', 'SSH_CONNECTION': '127.0.0.1 39996 127.0.0.1 22', 'GOROOT': '/home/XXX/.gvm/gos/go1.19.1', 'NVM_DIR': '/local/rcs/XXX/.nvm', 'VSCODE_GIT_ASKPASS_EXTRA_ARGS': '', 'XDG_SESSION_CLASS': 'user', 'PYTHONPATH': ':/local/rcs/XXX/code/pytrace-collector:/local/rcs/XXX/code/pytrace-collector/logs/pypibugs/tried/MrTango+click/MrTango+click', 'TERM': 'screen', 'ZSH': '/home/XXX/.oh-my-zsh', '_CE_CONDA': '', 'VSCODE_NONCE': 'd0bc7031-48a3-4719-8bb5-ef236ddd0016', 'ZDOTDIR': '/home/XXX', 'USER': 'XXX', 'TMUX_PANE': '%3', 'VSCODE_GIT_IPC_HANDLE': '/run/user/19200/vscode-git-13d67c6199.sock', 'CONDA_SHLVL': '3', 'SHLVL': '3', 'PAGER': 'cat', '_P9K_SSH_TTY': '/dev/pts/20', 'XDG_SESSION_ID': '43', 'CONDA_PYTHON_EXE': '/local/rcs/XXX/miniforge3/bin/python', 'LD_LIBRARY_PATH': '/home/XXX/.gvm/pkgsets/go1.19.1/global/overlay/lib:/home/XXX/.gvm/pkgsets/go1.19.1/global/overlay/lib', 'XDG_RUNTIME_DIR': '/run/user/19200', 'SSL_CERT_FILE': '/usr/lib/ssl/certs/ca-certificates.crt', 'SSH_CLIENT': '127.0.0.1 46946 22', 'CONDA_DEFAULT_ENV': 'MrTango+click', 'P9K_SSH': '1', 'LC_ALL': 'en_US.UTF-8', 'VSCODE_GIT_ASKPASS_MAIN': '/home/XXX/.vscode-server/cli/servers/Stable-31c37ee8f63491495ac49e43b8544550fbae4533/server/extensions/git/dist/askpass-main.js', 'XDG_DATA_DIRS': '/usr/local/share:/usr/share:/var/lib/snapd/desktop', 'BROWSER': '/home/XXX/.vscode-server/cli/servers/Stable-31c37ee8f63491495ac49e43b8544550fbae4533/server/bin/helpers/browser.sh', 'PATH': '/home/XXX/.gdrive-downloader:/local/arise/XXX/miniforge3/bin:/home/XXX/.gvm/pkgsets/go1.19.1/global/bin:/home/XXX/.gvm/gos/go1.19.1/bin:/home/XXX/.gvm/pkgsets/go1.19.1/global/overlay/bin:/home/XXX/.gvm/bin:/local/rcs/XXX/miniforge3/envs/MrTango+click/bin:/local/rcs/XXX/miniforge3/condabin:/home/XXX/.gdrive-downloader:/local/arise/XXX/miniforge3/bin:/home/XXX/.vscode-server/cli/servers/Stable-31c37ee8f63491495ac49e43b8544550fbae4533/server/bin/remote-cli:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/XXX/.local/bin:/home/XXX/.local/bin', 'DBUS_SESSION_BUS_ADDRESS': 'unix:path=/run/user/19200/bus', 'gvm_go_name': 'go1.19.1', 'CONDA_PREFIX_1': '/local/rcs/XXX/miniforge3', 'CONDA_PREFIX_2': '/local/rcs/XXX/miniforge3/envs/mal', 'OLDPWD': '/local/rcs/XXX/code/pytrace-collector', 'GOPATH': '/home/XXX/.gvm/pkgsets/go1.19.1/global', 'TERM_PROGRAM': 'tmux', 'VSCODE_IPC_HOOK_CLI': '/run/user/19200/vscode-ipc-518d6355-acaf-4714-a359-be3fe9f21e09.sock', '_': '/local/rcs/XXX/miniforge3/envs/MrTango+click/bin/python', 'PYTEST_CURRENT_TEST': 'tests/test_utils.py::test_echo_via_pager[cat] (call)'}

'haha\n'

<module 'subprocess' from '/local/rcs/XXX/miniforge3/envs/MrTango+click/lib/python3.9/subprocess.py'>


def emulate_input(text):
        if sys.version_info[0] == 2:
            from StringIO import StringIO
        else:
            from io import StringIO
        monkeypatch.setattr(sys, 'stdin', StringIO(text))
emulate_input(text='asdlkj\n', monkeypatch={_setattr=[], _setitem=[], _cwd=None, _savesyspath=None})

'asdlkj\n'

{_setattr=[(<module 'sys' (built-in)>, 'stdin', <_io.TextIOWrapper name='<stdin>' mode='r' encoding='utf-8'>)], _setitem=[], _cwd=None, _savesyspath=None}

'asdlkj\n'


def encode_request(*args):
    result = ["*" + str(len(args)) + CRLF]
    for arg in args:
        if arg is None:
            result.append('$-1' + CRLF)
        else:
            s = str(arg)
            result.append('$' + str(len(s)) + CRLF + s + CRLF)
    return "".join(result)
encode_request(args=('ping',))


result.append('$' + str(len(s)) + CRLF + s + CRLF)


def parse_array(data, start=0):
    endcnt = data.find(CRLF, start + 1)
    if endcnt == -1:
        raise ParseError("Unterminated array element count after pos {}.".format(start + 1))
    try:
        count = int(data[start + 1:endcnt])
    except (ValueError, TypeError):
        raise ParseError("Invalid array element count at pos {} - {}.".format(start + 1, endcnt))
    start = endcnt + CRLFLEN
    if count == -1:
        return None, endcnt
    result = []
    for i in range(count):
        if start + 4 < len(data):
            obj, start = _decode(data, start)
            result.append(obj)
        else:
            raise ParseError("Unterminated array element at pos {}".format(start))
    return result, start
parse_array(data='*3\r\n$3\r\nSET\r\n$15\r\nmemtier-8232902\r\n$2\r\nxx\r\n*3\r\n$3\r\nSET\r\n$15\r\nmemtier-8232902\r\n$2\r\nxx\r\n*3\r\n$3\r\nSET\r\n$15\r\nmemtier-7630684\r\n$3\r\nAAA\r\n', start=0)


def project_transactions(self, transactions, assets):
        for transaction in transactions:
            weight_diff = self.none_to_zero(transaction["weight"]) - self.none_to_zero(
                transaction["prev_weight"]
            )
            initial_amount = abs(weight_diff) / 100 * assets / transaction["price"]
            transaction["datetime"] = datetime.fromtimestamp(
                transaction["created_at"] // 1000
            )
            transaction["stock_code"] = transaction["stock_symbol"].lower()
            transaction["action"] = "buy" if weight_diff > 0 else "sell"
            transaction["amount"] = int(round(initial_amount, -2))
            if transaction["action"] == "sell" and self._adjust_sell:
                transaction["amount"] = self._adjust_sell_amount(
                    transaction["stock_code"], transaction["amount"]
                )
project_transactions(self=<easytrader.xq_follower.XueQiuFollower object at 0x7f0fc209dd00>, transactions=[{'weight': 10, 'prev_weight': 0, 'price': 10, 'stock_symbol': '162411', 'created_at': 1712231485016}], assets=1000, self._adjust_sell=True, self._adjust_sell_amount=<MagicMock id='139705656663152'>, self._users=None, self.expired_cmds=set(), self.s=<requests.sessions.Session object at 0x7f0fc2030910>, self.slippage=0.0, self.trade_queue=<queue.Queue object at 0x7f0fc209d850>)


initial_amount = abs(weight_diff) / 100 * assets / transaction["price"]


def _get_headers(self) -> Dict:
        headers = {
            'Accept': 'application/json',
            'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',
        }
        if self.API_KEY:
            assert self.API_KEY
            headers['X-MBX-APIKEY'] = self.API_KEY
        return headers
_get_headers(self=<binance.client.Client object at 0x7f60a8df5880>, self.API_KEY='api_key', self.API_SECRET='api_secret', self.API_URL='https://api.binance.com/api', self.FUTURES_COIN_DATA_URL='https://dapi.binance.com/futures/data', self.FUTURES_COIN_URL='https://dapi.binance.com/dapi', self.FUTURES_DATA_URL='https://fapi.binance.com/futures/data', self.FUTURES_URL='https://fapi.binance.com/fapi', self.MARGIN_API_URL='https://api.binance.com/sapi', self.OPTIONS_TESTNET_URL='https://testnet.binanceops.com/eapi', self.OPTIONS_URL='https://eapi.binance.com/eapi', self.PRIVATE_KEY=None, self.WEBSITE_URL='https://www.binance.com', self.tld='com')

{'Accept': 'application/json', 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36'}

{'Accept': 'application/json', 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36', 'X-MBX-APIKEY': 'api_key'}


{'Accept': 'application/json', 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36', 'X-MBX-APIKEY': 'api_key'}


def _get_request_kwargs(self, method, signed: bool, force_params: bool = False, **kwargs) -> Dict:
        kwargs['timeout'] = self.REQUEST_TIMEOUT
        if self._requests_params:
            kwargs.update(self._requests_params)
        data = kwargs.get('data', None)
        if data and isinstance(data, dict):
            kwargs['data'] = data
            if 'requests_params' in kwargs['data']:
                kwargs.update(kwargs['data']['requests_params'])
                del kwargs['data']['requests_params']
        if signed:
            kwargs['data']['timestamp'] = int(time.time() * 1000 + self.timestamp_offset)
            kwargs['data']['signature'] = self._generate_signature(kwargs['data'])
        if data:
            kwargs['data'] = self._order_params(kwargs['data'])
            null_args = [i for i, (key, value) in enumerate(kwargs['data']) if value is None]
            for i in reversed(null_args):
                del kwargs['data'][i]
        if data and (method == 'get' or force_params):
            kwargs['params'] = '&'.join('%s=%s' % (data[0], data[1]) for data in kwargs['data'])
            del kwargs['data']
        return kwargs
_get_request_kwargs(self=<binance.client.Client object at 0x7f60a8df5880>, method='get', signed=False, force_params=False, kwargs={}, self.API_KEY='api_key', self.API_SECRET='api_secret', self.API_URL='https://api.binance.com/api', self.FUTURES_COIN_DATA_URL='https://dapi.binance.com/futures/data', self.FUTURES_COIN_URL='https://dapi.binance.com/dapi', self.FUTURES_DATA_URL='https://fapi.binance.com/futures/data', self.FUTURES_URL='https://fapi.binance.com/fapi', self.MARGIN_API_URL='https://api.binance.com/sapi', self.OPTIONS_TESTNET_URL='https://testnet.binanceops.com/eapi', self.OPTIONS_URL='https://eapi.binance.com/eapi', self.PRIVATE_KEY=None, self.WEBSITE_URL='https://www.binance.com', self._requests_params=None, self.response=None, self.session=<requests.sessions.Session object at 0x7f60a8df5f10>, self.testnet=False, self.timestamp_offset=0, self.tld='com')


def fetch(url: str, **kwargs) -> Selector:
    kwargs.setdefault('headers', DEFAULT_HEADERS)
    try:
        res = requests.get(url, **kwargs)
        res.encoding = kwargs.get('encoding', DEFAULT_ENCODING)
        res.raise_for_status()
    except requests.RequestException as e:
        print(e)
    else:
        html = res.text
        tree = Selector(text=html)
        return tree
fetch(url='https://konachan.com/post', kwargs={})

{'headers': {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36'}}

<Selector query=None data='<html class="action-post action-post-...'>


def fix_signature(func: Callable, source: Callable, skip_n_params: int):
    original_doc = func.__doc__
    update_wrapper(func, source)
    if original_doc:
        func.__doc__ = f'{original_doc}\n{func.__doc__}'
    sig = signature(func)
    sig = sig.replace(parameters=tuple(sig.parameters.values())[skip_n_params:])
    func.__signature__ = sig
    return func
fix_signature(func=<function spinner_controller.<locals>.inner_controller.<locals>.compile_and_check at 0x7f355614d4c0>, source=<function check at 0x7f3556385dc0>, skip_n_params=1)

'Compile this spinner factory at its natural length, and...'


def inner_schedule(*args, **kwargs):
                signature(command).bind(1, *args, **kwargs)
                extra, cmd_type = dict(extra_commands), EXTRA_COMMANDS[command]
                extra[cmd_type] = extra.get(cmd_type, ()) + ((command, args, kwargs),)
                return inner_controller(spinner_inner_factory, op_params, extra)
inner_schedule(args=(1,), kwargs={}, command=<function reshape at 0x7f35563858b0>, extra_commands={}, inner_controller=<function spinner_controller.<locals>.inner_controller at 0x7f3555de31f0>, op_params={}, spinner_inner_factory=<function frame_spinner_factory.<locals>.inner_spinner_factory at 0x7f3555de34c0>)


def draw_known(apply_state, percent):
            virtual_fill = round(virtual_length * max(0., min(1., percent)))
            fill = fill_style(*divmod(virtual_fill, num_graphemes))
            border, texts = apply_state(fill)
            border = overflow if percent > 1. else None if percent == 1. else border
            return fix_cells(combine_cells(fill, tip, *texts)[len_tip:length + len_tip]), border
draw_known(apply_state=<function bar_factory.<locals>.inner_bar_factory.<locals>.running at 0x7f35539a6040>, percent=-0.5, fill_style=<function bar_factory.<locals>.inner_bar_factory.<locals>.fill_style at 0x7f3553b38f70>, len_tip=5, length=10, num_graphemes=1, overflow=('x',), tip=('@', '


fill = fill_style(*divmod(virtual_fill, num_graphemes))


def test_split_options(param, expected):
    if expected is SAME:
        expected = param
    assert split_options(param) == expected
test_split_options(param=None, expected=(None, None))


def get_term(file=None, force_tty=None, cols=None):
    if file is None:
        file = sys.stdout
    base = tty.new(file, cols or 80)
    if hasattr(file, 'isatty') and file.isatty() if force_tty is None else force_tty:
        return _create(jupyter.get_from(base) if _is_notebook() else base, True)
    return _create(non_tty.get_from(base), False)
get_term(file=None, force_tty=None, cols=None)

namespace(original=<_io.TextIOWrapper encoding='UTF-8'>, max_cols=80, write=<built-in method write of CaptureIO object at 0x7f3548f50a00>, flush=<built-in method flush of CaptureIO object at 0x7f3548f50a00>, _fd=1, cols=<function new.<locals>.cols at 0x7f354785eee0>, _ansi_escape_sequence=<function new.<locals>._ansi_escape_sequence at 0x7f354785e5e0>, factory_cursor_up=<function new.<locals>.factory_cursor_up at 0x7f354785ea60>, clear_line=<function new.<locals>._ansi_escape_sequence.<locals>.inner at 0x7f354785eaf0>, clear_end_line=<function new.<locals>._ansi_escape_sequence.<locals>.inner at 0x7f354785e8b0>, clear_end_screen=<function new.<locals>._ansi_escape_sequence.<locals>.inner at 0x7f354785e940>, hide_cursor=<function new.<locals>._ansi_escape_sequence.<locals>.inner at 0x7f354785ec10>, show_cursor=<function new.<locals>._ansi_escape_sequence.<locals>.inner at 0x7f354785eca0>, carriage_return='\r')


def uninstall():
        flush_buffers()
        buffers.clear()
        sys.stdout, sys.stderr = base
        [handler.setStream(original) for handler, original in before_handlers.items() if original]
        before_handlers.clear()
uninstall(base=(<_io.TextIOWrapper encoding='UTF-8'>, <_io.TextIOWrapper encoding='UTF-8'>), before_handlers={<LogCaptureHandler (NOTSET)>: <_io.StringIO object at 0x7f35479bba60>, <LogCaptureHandler (NOTSET)>: <_io.StringIO object at 0x7f35479bb8b0>, <_FileHandler /dev/null (NOTSET)>: <_io.TextIOWrapper name='/dev/null' mode='w' encoding='UTF-8'>}, buffers=defaultdict(<class 'list'>, {<_io.TextIOWrapper encoding='UTF-8'>: []}), flush_buffers=<function buffered_hook_manager.<locals>.flush_buffers at 0x7f354785eee0>)

defaultdict(<class 'list'>, {<_io.StringIO object at 0x7f35479bba60>: [], <_io.StringIO object at 0x7f35479bb8b0>: [], <_io.TextIOWrapper name='/dev/null' mode='w' encoding='UTF-8'>: []})


def __init__(self, func, value, default):
        self.func = func
        if isinstance(value, str):
            self.f = value
        elif value:
            self.f = default
        else:
            self.f = ''
        if self.f:
            self.f += ' '
__init__(self=<alive_progress.core.progress._Widget object at 0x7f354a355520>, func=<function __alive_bar.<locals>.monitor_run at 0x7f35458a6280>, value=True, default='{percent:.0%} [{count}/{total}]')


def _render_title(config, title=None):
    title, length = to_cells(title or config.title or ''), config.title_length
    if not length:
        return title
    len_title = len(title)
    if len_title <= length:
        return combine_cells(title, (' ',) * (length - len_title))
    if length == 1:
        return '…',
    return combine_cells(fix_cells(title[:length - 1]), ('…',))
_render_title(config=Config(title=None, length=3, max_cols=80, spinner=<function spinner_controller.<locals>.inner_controller.<locals>.spinner_compiler_dispatcher_factory at 0x7f3555c001f0>, bar=<function bar_controller.<locals>.bar_assembler_factory at 0x7f3554094550>, unknown=<function spinner_controller.<locals>.inner_controller.<locals>.spinner_compiler_dispatcher_factory at 0x7f35557bdee0>, force_tty=False, disable=False, manual=True, enrich_print=True, receipt=True, receipt_text=False, monitor=True, elapsed=True, stats=True, title_length=0, spinner_length=0, refresh_secs=0.0, monitor_end=True, elapsed_end=True, stats_end=True, ctrl_c=True, dual_line=False, unit='U', scale='SI', precision=1, file=<_io.TextIOWrapper encoding='UTF-8'>), title=None)


def start_monitoring(offset=0.):
        term.hide_cursor()
        hook_manager.install()
        bar_handle._handle = bar
        run.init = time.perf_counter() - offset
        event_renderer.set()
start_monitoring(offset=0.0, bar=<function __alive_bar.<locals>.bar at 0x7f3549a930d0>, bar_handle={_handle=None}, event_renderer={_cond=<Condition(<unlocked _thread.lock object at 0x7f354eb01c60>, 0)>, _flag=False}, hook_manager=namespace(flush_buffers=<function buffered_hook_manager.<locals>.flush_buffers at 0x7f354a3b35e0>, install=<function buffered_hook_manager.<locals>.install at 0x7f3545926ca0>, uninstall=<function buffered_hook_manager.<locals>.uninstall at 0x7f3545926f70>), run=<function __alive_bar.<locals>.run at 0x7f35479bb4c0>, term=namespace(interactive=False, cursor_up_1=<function _ansi_escape_sequence.<locals>.inner at 0x7f3545926b80>, write=<built-in method write of CaptureIO object at 0x7f3545b2e450>, flush=<built-in method flush of CaptureIO object at 0x7f3545b2e450>, cols=<function get_from.<locals>.cols at 0x7f35459265e0>, carriage_return='', clear_line=<function _ansi_escape_sequence.<locals>.inner at 0x7f35564913a0>, clear_end_line=<function _ansi_escape_sequence.<locals>.inner at 0x7f3556491430>, clear_end_screen=<function _ansi_escape_sequence.<locals>.inner at 0x7f3556491550>, hide_cursor=<function _ansi_escape_sequence.<locals>.inner at 0x7f35564915e0>, show_cursor=<function _ansi_escape_sequence.<locals>.inner at 0x7f3556491670>, factory_cursor_up=<function factory_cursor_up at 0x7f3556491700>))

{_cond=<Condition(<unlocked _thread.lock object at 0x7f354eb01c60>, 0)>, _flag=True}


def stop_monitoring():
        term.show_cursor()
        hook_manager.uninstall()
        bar_handle._handle = None
        return time.perf_counter() - run.init
stop_monitoring(bar_handle={}, hook_manager=namespace(flush_buffers=<function buffered_hook_manager.<locals>.flush_buffers at 0x7f354a3b35e0>, install=<function buffered_hook_manager.<locals>.install at 0x7f3545926ca0>, uninstall=<function buffered_hook_manager.<locals>.uninstall at 0x7f3545926f70>), run=<function __alive_bar.<locals>.run at 0x7f35479bb4c0>, term=namespace(interactive=False, cursor_up_1=<function _ansi_escape_sequence.<locals>.inner at 0x7f3545926b80>, write=<built-in method write of CaptureIO object at 0x7f3545b2e450>, flush=<built-in method flush of CaptureIO object at 0x7f3545b2e450>, cols=<function get_from.<locals>.cols at 0x7f35459265e0>, carriage_return='', clear_line=<function _ansi_escape_sequence.<locals>.inner at 0x7f35564913a0>, clear_end_line=<function _ansi_escape_sequence.<locals>.inner at 0x7f3556491430>, clear_end_screen=<function _ansi_escape_sequence.<locals>.inner at 0x7f3556491550>, hide_cursor=<function _ansi_escape_sequence.<locals>.inner at 0x7f35564915e0>, show_cursor=<function _ansi_escape_sequence.<locals>.inner at 0x7f3556491670>, factory_cursor_up=<function factory_cursor_up at 0x7f3556491700>))


def elapsed_text(seconds, precise, prefix=''):
    seconds = round(seconds, 1 if precise else 0)
    if seconds < 60.:
        return '{}{:{}f}s'.format(prefix, seconds, .1 if precise else .0)
    minutes, seconds = divmod(seconds, 60.)
    if minutes < 60.:
        return '{}{:.0f}:{:0{}f}'.format(prefix, minutes, seconds, 4.1 if precise else 2.0)
    hours, minutes = divmod(minutes, 60.)
    return '{}{:.0f}:{:02.0f}:{:0{}f}'.format(prefix, hours, minutes, seconds,
                                              4.1 if precise else 2.0)
elapsed_text(seconds=1.23, precise=True, prefix='')


def __getitem__(self, table_name):
        return self.get_table(table_name)
__getitem__(self=<Database(sqlite://)>, table_name='weather', self._tables={}, self.connections={}, self.engine=Engine(sqlite://), self.ensure_schema=True, self.is_postgres=False, self.is_sqlite=True, self.local=<_thread._local object at 0x7f5a15959d10>, self.lock=<unlocked _thread.RLock object owner=0 count=0 at 0x7f5a159edbd0>, self.row_type=<class 'collections.OrderedDict'>, self.schema=None, self.types=<dataset.types.Types object at 0x7f5a159edb50>, self.url='sqlite://')

{140024935069504: <sqlalchemy.engine.base.Connection object at 0x7f5a15918b80>}


def mknode(id=None, ip=None, port=None, intid=None):
    if intid is not None:
        id = pack('>l', intid)
    id = id or hashlib.sha1(str(random.getrandbits(255))).digest()
    return Node(id, ip, port)
mknode(id=None, ip=None, port=None, intid=0)


def getblockimpl(lines, first, last, pilcrow):
    max = len(lines) - 1
    first -= 1
    last -= 1
    i = first
    while i < max and not hastext(lines[i]):
        if i >= last and istoplevel(lines[i + 1]):
            return None, None, '
        i += 1
    while last < max and not istoplevel(lines[last + 1]):
        last += 1
    while first < last and not hastext(lines[first]):
        first += 1
    while first and not istoplevel(lines[first]):
        first -= 1
    lines[last]
    return first, last, eol.join(l for l in lines[first:last + 1] if hastext(l)) + pilcrow + eol
getblockimpl(lines=['', 'hello', 'function with', ' indented block', 'class with', '', '  block after blank', '  \tand its own indented block', '\t', '  and back again after a wrong blank', '', 'something else', '\t', ' \t', 'last'], first=10, last=11, pilcrow='')


Output: '{time:YYYY-MM-DD HH:mm:ss.SSS}'

Output: '{time:YYYY-MM-DD HH:mm:ss.SSS} | '

Output: '{time:YYYY-MM-DD HH:mm:ss.SSS} | {level: <8}'

Output: '{time:YYYY-MM-DD HH:mm:ss.SSS} | {level: <8} | '

Output: '{time:YYYY-MM-DD HH:mm:ss.SSS} | {level: <8} | {name}'

Output: '{time:YYYY-MM-DD HH:mm:ss.SSS} | {level: <8} | {name}:'

Output: '{time:YYYY-MM-DD HH:mm:ss.SSS} | {level: <8} | {name}:{function}'

Output: '{time:YYYY-MM-DD HH:mm:ss.SSS} | {level: <8} | {name}:{function}:'

Output: '{time:YYYY-MM-DD HH:mm:ss.SSS} | {level: <8} | {name}:{function}:{line}'

Output: '{time:YYYY-MM-DD HH:mm:ss.SSS} | {level: <8} | {name}:{function}:{line} - '

Output: '{time:YYYY-MM-DD HH:mm:ss.SSS} | {level: <8} | {name}:{function}:{line} - {message}'

Output: '{time:YYYY-MM-DD HH:mm:ss.SSS} | {level: <8} | {name}:{function}:{line} - {message}\n'

Output: '{time:YYYY-MM-DD HH:mm:ss.SSS} | {level: <8} | {name}:{function}:{line} - {message}\n{exception}'


def parse(text, *, strip=False, strict=True):
    parser = loguru._colorizer.AnsiParser()
    parser.feed(text)
    tokens = parser.done(strict=strict)
    if strip:
        return parser.strip(tokens)
    return parser.colorize(tokens, "")
parse(text='<red>Foo</red>\n', strip=False, strict=True)

'<red>Foo</red>\n'

'<red>Foo</red>\n'


'<red>Foo</red>\n'

'<red>Foo</red>\n'


def stop(self):
        with self._protected_lock():
            self._stopped = True
            if self._enqueue:
                if self._owner_process_pid != os.getpid():
                    return
                self._queue.put(None)
                self._thread.join()
                if hasattr(self._queue, "close"):
                    self._queue.close()
            self._sink.stop()
stop(self=(id=0, level=10, sink=<stderr>), self._colorize=False, self._confirmation_event=None, self._confirmation_lock=None, self._decolorized_format='{time:YYYY-MM-DD HH:mm:ss.SSS} | {level: <8} | {name}:{function}:{line} - {message}\n{exception}', self._enqueue=False, self._error_interceptor=<loguru._error_interceptor.ErrorInterceptor object at 0x7fbe3c13e400>, self._exception_formatter=<loguru._better_exceptions.ExceptionFormatter object at 0x7fbe3bf7c9a0>, self._filter=None, self._formatter=<loguru._colorizer.ColoredFormat object at 0x7fbe3c1a69d0>, self._id=0, self._is_formatter_dynamic=False, self._levelno=10, self._levels_ansi_codes={'TRACE': '\x1b[36m\x1b[1m', 'DEBUG': '\x1b[34m\x1b[1m', 'INFO': '\x1b[1m', 'SUCCESS': '\x1b[32m\x1b[1m', 'WARNING': '\x1b[33m\x1b[1m', 'ERROR': '\x1b[31m\x1b[1m', 'CRITICAL': '\x1b[41m\x1b[1m', None: ''}, self._lock=<unlocked _thread.lock object at 0x7fbe3bf7cc90>, self._lock_acquired=<_thread._local object at 0x7fbe3bec8db0>, self._memoize_dynamic_format=None, self._multiprocessing_context=None, self._name='<stderr>', self._owner_process_pid=None, self._precolorized_formats={}, self._queue=None, self._queue_lock=None, self._serialize=False, self._sink=<loguru._simple_sinks.StreamSink object at 0x7fbe3c1effd0>, self._stopped=False, self._thread=None)

<locked _thread.lock object at 0x7fbe3bf7cc90>


def _parse_without_formatting(string, *, recursion_depth=2, recursive=False):
        if recursion_depth < 0:
            raise ValueError("Max string recursion exceeded")
        formatter = Formatter()
        parser = AnsiParser()
        messages_color_tokens = []
        for literal_text, field_name, format_spec, conversion in formatter.parse(string):
            if literal_text and literal_text[-1] in "{}":
                literal_text += literal_text[-1]
            parser.feed(literal_text, raw=recursive)
            if field_name is not None:
                if field_name == "message":
                    if recursive:
                        messages_color_tokens.append(None)
                    else:
                        color_tokens = parser.current_color_tokens()
                        messages_color_tokens.append(color_tokens)
                field = "{%s" % field_name
                if conversion:
                    field += "!%s" % conversion
                if format_spec:
                    field += ":%s" % format_spec
                field += "}"
                parser.feed(field, raw=True)
                _, color_tokens = Colorizer._parse_without_formatting(
                    format_spec, recursion_depth=recursion_depth - 1, recursive=True
                )
                messages_color_tokens.extend(color_tokens)
        return parser.done(), messages_color_tokens
_parse_without_formatting(string='', recursion_depth=1, recursive=True)


def _format_value(self, v):
        try:
            v = repr(v)
        except Exception:
            v = "<unprintable %s object>" % type(v).__name__
        max_length = self._max_length
        if max_length is not None and len(v) > max_length:
            v = v[: max_length - 3] + "..."
        return v
_format_value(self=<loguru._better_exceptions.ExceptionFormatter object at 0x7fbe3bdd29a0>, v=<module 'runpy' from '/local/rcs/XXX/miniforge3/envs/Delgan+loguru/lib/python3.9/runpy.py'>, self._backtrace=True, self._cap_char='└', self._catch_point_identifier=' <Loguru catch point here>', self._colorize=False, self._diagnose=True, self._encoding='utf8', self._hidden_frames_filename='/local/rcs/XXX/code/pytrace-collector/logs/self_collected/tried/Delgan+loguru/Delgan+loguru/loguru/_logger.py', self._lib_dirs=['/local/rcs/XXX/miniforge3/envs/delgan+loguru/lib/python3.9/', '/local/rcs/XXX/miniforge3/envs/delgan+loguru/lib/python3.9/site-packages/'], self._max_length=128, self._pipe_char='│', self._prefix='', self._syntax_highlighter=<loguru._better_exceptions.SyntaxHighlighter object at 0x7fbe3bdd27f0>, self._theme={'introduction': '\x1b[33m\x1b[1m{}\x1b[0m', 'cause': '\x1b[1m{}\x1b[0m', 'context': '\x1b[1m{}\x1b[0m', 'dirname': '\x1b[32m{}\x1b[0m', 'basename': '\x1b[32m\x1b[1m{}\x1b[0m', 'line': '\x1b[33m{}\x1b[0m', 'function': '\x1b[35m{}\x1b[0m', 'exception_type': '\x1b[31m\x1b[1m{}\x1b[0m', 'exception_value': '\x1b[1m{}\x1b[0m', 'arrows': '\x1b[36m{}\x1b[0m', 'value': '\x1b[36m\x1b[1m{}\x1b[0m'})

"<module 'runpy' from '/local/rcs/XXX/miniforge3/envs/Delgan+loguru/lib/python3.9/runpy.py'>"


def extract_api_info_for_service(service, path_prefix):
    service_methods = service.DESCRIPTOR.methods
    res = {}
    for service_method in service_methods:
        endpoints = service_method.GetOptions().Extensions[databricks_pb2.rpc].endpoints
        endpoint = endpoints[0]
        endpoint_path = _get_path(path_prefix, endpoint.path)
        res[service().GetRequestClass(service_method)] = (endpoint_path, endpoint.method)
    return res
extract_api_info_for_service(service=<class 'model_registry_pb2.ModelRegistryService'>, path_prefix='/api/2.0')

{<class 'model_registry_pb2.CreateRegisteredModel'>: ('/api/2.0/mlflow/registered-models/create', 'POST')}

{<class 'model_registry_pb2.CreateRegisteredModel'>: ('/api/2.0/mlflow/registered-models/create', 'POST'), <class 'model_registry_pb2.RenameRegisteredModel'>: ('/api/2.0/mlflow/registered-models/rename', 'POST')}

{<class 'model_registry_pb2.CreateRegisteredModel'>: ('/api/2.0/mlflow/registered-models/create', 'POST'), <class 'model_registry_pb2.RenameRegisteredModel'>: ('/api/2.0/mlflow/registered-models/rename', 'POST'), <class 'model_registry_pb2.UpdateRegisteredModel'>: ('/api/2.0/mlflow/registered-models/update', 'PATCH')}

{<class 'model_registry_pb2.CreateRegisteredModel'>: ('/api/2.0/mlflow/registered-models/create', 'POST'), <class 'model_registry_pb2.RenameRegisteredModel'>: ('/api/2.0/mlflow/registered-models/rename', 'POST'), <class 'model_registry_pb2.UpdateRegisteredModel'>: ('/api/2.0/mlflow/registered-models/update', 'PATCH'), <class 'model_registry_pb2.DeleteRegisteredModel'>: ('/api/2.0/mlflow/registered-models/delete', 'DELETE')}

{<class 'model_registry_pb2.CreateRegisteredModel'>: ('/api/2.0/mlflow/registered-models/create', 'POST'), <class 'model_registry_pb2.RenameRegisteredModel'>: ('/api/2.0/mlflow/registered-models/rename', 'POST'), <class 'model_registry_pb2.UpdateRegisteredModel'>: ('/api/2.0/mlflow/registered-models/update', 'PATCH'), <class 'model_registry_pb2.DeleteRegisteredModel'>: ('/api/2.0/mlflow/registered-models/delete', 'DELETE'), <class 'model_registry_pb2.GetRegisteredModel'>: ('/api/2.0/mlflow/registered-models/get', 'GET')}

{<class 'model_registry_pb2.CreateRegisteredModel'>: ('/api/2.0/mlflow/registered-models/create', 'POST'), <class 'model_registry_pb2.RenameRegisteredModel'>: ('/api/2.0/mlflow/registered-models/rename', 'POST'), <class 'model_registry_pb2.UpdateRegisteredModel'>: ('/api/2.0/mlflow/registered-models/update', 'PATCH'), <class 'model_registry_pb2.DeleteRegisteredModel'>: ('/api/2.0/mlflow/registered-models/delete', 'DELETE'), <class 'model_registry_pb2.GetRegisteredModel'>: ('/api/2.0/mlflow/registered-models/get', 'GET'), <class 'model_registry_pb2.SearchRegisteredModels'>: ('/api/2.0/mlflow/registered-models/search', 'GET')}

{<class 'model_registry_pb2.CreateRegisteredModel'>: ('/api/2.0/mlflow/registered-models/create', 'POST'), <class 'model_registry_pb2.RenameRegisteredModel'>: ('/api/2.0/mlflow/registered-models/rename', 'POST'), <class 'model_registry_pb2.UpdateRegisteredModel'>: ('/api/2.0/mlflow/registered-models/update', 'PATCH'), <class 'model_registry_pb2.DeleteRegisteredModel'>: ('/api/2.0/mlflow/registered-models/delete', 'DELETE'), <class 'model_registry_pb2.GetRegisteredModel'>: ('/api/2.0/mlflow/registered-models/get', 'GET'), <class 'model_registry_pb2.SearchRegisteredModels'>: ('/api/2.0/mlflow/registered-models/search', 'GET'), <class 'model_registry_pb2.GetLatestVersions'>: ('/api/2.0/mlflow/registered-models/get-latest-versions', 'POST')}

{<class 'model_registry_pb2.CreateRegisteredModel'>: ('/api/2.0/mlflow/registered-models/create', 'POST'), <class 'model_registry_pb2.RenameRegisteredModel'>: ('/api/2.0/mlflow/registered-models/rename', 'POST'), <class 'model_registry_pb2.UpdateRegisteredModel'>: ('/api/2.0/mlflow/registered-models/update', 'PATCH'), <class 'model_registry_pb2.DeleteRegisteredModel'>: ('/api/2.0/mlflow/registered-models/delete', 'DELETE'), <class 'model_registry_pb2.GetRegisteredModel'>: ('/api/2.0/mlflow/registered-models/get', 'GET'), <class 'model_registry_pb2.SearchRegisteredModels'>: ('/api/2.0/mlflow/registered-models/search', 'GET'), <class 'model_registry_pb2.GetLatestVersions'>: ('/api/2.0/mlflow/registered-models/get-latest-versions', 'POST'), <class 'model_registry_pb2.CreateModelVersion'>: ('/api/2.0/mlflow/model-versions/create', 'POST')}

{<class 'model_registry_pb2.CreateRegisteredModel'>: ('/api/2.0/mlflow/registered-models/create', 'POST'), <class 'model_registry_pb2.RenameRegisteredModel'>: ('/api/2.0/mlflow/registered-models/rename', 'POST'), <class 'model_registry_pb2.UpdateRegisteredModel'>: ('/api/2.0/mlflow/registered-models/update', 'PATCH'), <class 'model_registry_pb2.DeleteRegisteredModel'>: ('/api/2.0/mlflow/registered-models/delete', 'DELETE'), <class 'model_registry_pb2.GetRegisteredModel'>: ('/api/2.0/mlflow/registered-models/get', 'GET'), <class 'model_registry_pb2.SearchRegisteredModels'>: ('/api/2.0/mlflow/registered-models/search', 'GET'), <class 'model_registry_pb2.GetLatestVersions'>: ('/api/2.0/mlflow/registered-models/get-latest-versions', 'POST'), <class 'model_registry_pb2.CreateModelVersion'>: ('/api/2.0/mlflow/model-versions/create', 'POST'), <class 'model_registry_pb2.UpdateModelVersion'>: ('/api/2.0/mlflow/model-versions/update', 'PATCH')}

{<class 'model_registry_pb2.CreateRegisteredModel'>: ('/api/2.0/mlflow/registered-models/create', 'POST'), <class 'model_registry_pb2.RenameRegisteredModel'>: ('/api/2.0/mlflow/registered-models/rename', 'POST'), <class 'model_registry_pb2.UpdateRegisteredModel'>: ('/api/2.0/mlflow/registered-models/update', 'PATCH'), <class 'model_registry_pb2.DeleteRegisteredModel'>: ('/api/2.0/mlflow/registered-models/delete', 'DELETE'), <class 'model_registry_pb2.GetRegisteredModel'>: ('/api/2.0/mlflow/registered-models/get', 'GET'), <class 'model_registry_pb2.SearchRegisteredModels'>: ('/api/2.0/mlflow/registered-models/search', 'GET'), <class 'model_registry_pb2.GetLatestVersions'>: ('/api/2.0/mlflow/registered-models/get-latest-versions', 'POST'), <class 'model_registry_pb2.CreateModelVersion'>: ('/api/2.0/mlflow/model-versions/create', 'POST'), <class 'model_registry_pb2.UpdateModelVersion'>: ('/api/2.0/mlflow/model-versions/update', 'PATCH'), <class 'model_registry_pb2.TransitionModelVersionStage'>: ('/api/2.0/mlflow/model-versions/transition-stage', 'POST')}

{<class 'model_registry_pb2.CreateRegisteredModel'>: ('/api/2.0/mlflow/registered-models/create', 'POST'), <class 'model_registry_pb2.RenameRegisteredModel'>: ('/api/2.0/mlflow/registered-models/rename', 'POST'), <class 'model_registry_pb2.UpdateRegisteredModel'>: ('/api/2.0/mlflow/registered-models/update', 'PATCH'), <class 'model_registry_pb2.DeleteRegisteredModel'>: ('/api/2.0/mlflow/registered-models/delete', 'DELETE'), <class 'model_registry_pb2.GetRegisteredModel'>: ('/api/2.0/mlflow/registered-models/get', 'GET'), <class 'model_registry_pb2.SearchRegisteredModels'>: ('/api/2.0/mlflow/registered-models/search', 'GET'), <class 'model_registry_pb2.GetLatestVersions'>: ('/api/2.0/mlflow/registered-models/get-latest-versions', 'POST'), <class 'model_registry_pb2.CreateModelVersion'>: ('/api/2.0/mlflow/model-versions/create', 'POST'), <class 'model_registry_pb2.UpdateModelVersion'>: ('/api/2.0/mlflow/model-versions/update', 'PATCH'), <class 'model_registry_pb2.TransitionModelVersionStage'>: ('/api/2.0/mlflow/model-versions/transition-stage', 'POST'), <class 'model_registry_pb2.DeleteModelVersion'>: ('/api/2.0/mlflow/model-versions/delete', 'DELETE')}

{<class 'model_registry_pb2.CreateRegisteredModel'>: ('/api/2.0/mlflow/registered-models/create', 'POST'), <class 'model_registry_pb2.RenameRegisteredModel'>: ('/api/2.0/mlflow/registered-models/rename', 'POST'), <class 'model_registry_pb2.UpdateRegisteredModel'>: ('/api/2.0/mlflow/registered-models/update', 'PATCH'), <class 'model_registry_pb2.DeleteRegisteredModel'>: ('/api/2.0/mlflow/registered-models/delete', 'DELETE'), <class 'model_registry_pb2.GetRegisteredModel'>: ('/api/2.0/mlflow/registered-models/get', 'GET'), <class 'model_registry_pb2.SearchRegisteredModels'>: ('/api/2.0/mlflow/registered-models/search', 'GET'), <class 'model_registry_pb2.GetLatestVersions'>: ('/api/2.0/mlflow/registered-models/get-latest-versions', 'POST'), <class 'model_registry_pb2.CreateModelVersion'>: ('/api/2.0/mlflow/model-versions/create', 'POST'), <class 'model_registry_pb2.UpdateModelVersion'>: ('/api/2.0/mlflow/model-versions/update', 'PATCH'), <class 'model_registry_pb2.TransitionModelVersionStage'>: ('/api/2.0/mlflow/model-versions/transition-stage', 'POST'), <class 'model_registry_pb2.DeleteModelVersion'>: ('/api/2.0/mlflow/model-versions/delete', 'DELETE'), <class 'model_registry_pb2.GetModelVersion'>: ('/api/2.0/mlflow/model-versions/get', 'GET')}

{<class 'model_registry_pb2.CreateRegisteredModel'>: ('/api/2.0/mlflow/registered-models/create', 'POST'), <class 'model_registry_pb2.RenameRegisteredModel'>: ('/api/2.0/mlflow/registered-models/rename', 'POST'), <class 'model_registry_pb2.UpdateRegisteredModel'>: ('/api/2.0/mlflow/registered-models/update', 'PATCH'), <class 'model_registry_pb2.DeleteRegisteredModel'>: ('/api/2.0/mlflow/registered-models/delete', 'DELETE'), <class 'model_registry_pb2.GetRegisteredModel'>: ('/api/2.0/mlflow/registered-models/get', 'GET'), <class 'model_registry_pb2.SearchRegisteredModels'>: ('/api/2.0/mlflow/registered-models/search', 'GET'), <class 'model_registry_pb2.GetLatestVersions'>: ('/api/2.0/mlflow/registered-models/get-latest-versions', 'POST'), <class 'model_registry_pb2.CreateModelVersion'>: ('/api/2.0/mlflow/model-versions/create', 'POST'), <class 'model_registry_pb2.UpdateModelVersion'>: ('/api/2.0/mlflow/model-versions/update', 'PATCH'), <class 'model_registry_pb2.TransitionModelVersionStage'>: ('/api/2.0/mlflow/model-versions/transition-stage', 'POST'), <class 'model_registry_pb2.DeleteModelVersion'>: ('/api/2.0/mlflow/model-versions/delete', 'DELETE'), <class 'model_registry_pb2.GetModelVersion'>: ('/api/2.0/mlflow/model-versions/get', 'GET'), <class 'model_registry_pb2.SearchModelVersions'>: ('/api/2.0/mlflow/model-versions/search', 'GET')}

{<class 'model_registry_pb2.CreateRegisteredModel'>: ('/api/2.0/mlflow/registered-models/create', 'POST'), <class 'model_registry_pb2.RenameRegisteredModel'>: ('/api/2.0/mlflow/registered-models/rename', 'POST'), <class 'model_registry_pb2.UpdateRegisteredModel'>: ('/api/2.0/mlflow/registered-models/update', 'PATCH'), <class 'model_registry_pb2.DeleteRegisteredModel'>: ('/api/2.0/mlflow/registered-models/delete', 'DELETE'), <class 'model_registry_pb2.GetRegisteredModel'>: ('/api/2.0/mlflow/registered-models/get', 'GET'), <class 'model_registry_pb2.SearchRegisteredModels'>: ('/api/2.0/mlflow/registered-models/search', 'GET'), <class 'model_registry_pb2.GetLatestVersions'>: ('/api/2.0/mlflow/registered-models/get-latest-versions', 'POST'), <class 'model_registry_pb2.CreateModelVersion'>: ('/api/2.0/mlflow/model-versions/create', 'POST'), <class 'model_registry_pb2.UpdateModelVersion'>: ('/api/2.0/mlflow/model-versions/update', 'PATCH'), <class 'model_registry_pb2.TransitionModelVersionStage'>: ('/api/2.0/mlflow/model-versions/transition-stage', 'POST'), <class 'model_registry_pb2.DeleteModelVersion'>: ('/api/2.0/mlflow/model-versions/delete', 'DELETE'), <class 'model_registry_pb2.GetModelVersion'>: ('/api/2.0/mlflow/model-versions/get', 'GET'), <class 'model_registry_pb2.SearchModelVersions'>: ('/api/2.0/mlflow/model-versions/search', 'GET'), <class 'model_registry_pb2.GetModelVersionDownloadUri'>: ('/api/2.0/mlflow/model-versions/get-download-uri', 'GET')}

{<class 'model_registry_pb2.CreateRegisteredModel'>: ('/api/2.0/mlflow/registered-models/create', 'POST'), <class 'model_registry_pb2.RenameRegisteredModel'>: ('/api/2.0/mlflow/registered-models/rename', 'POST'), <class 'model_registry_pb2.UpdateRegisteredModel'>: ('/api/2.0/mlflow/registered-models/update', 'PATCH'), <class 'model_registry_pb2.DeleteRegisteredModel'>: ('/api/2.0/mlflow/registered-models/delete', 'DELETE'), <class 'model_registry_pb2.GetRegisteredModel'>: ('/api/2.0/mlflow/registered-models/get', 'GET'), <class 'model_registry_pb2.SearchRegisteredModels'>: ('/api/2.0/mlflow/registered-models/search', 'GET'), <class 'model_registry_pb2.GetLatestVersions'>: ('/api/2.0/mlflow/registered-models/get-latest-versions', 'POST'), <class 'model_registry_pb2.CreateModelVersion'>: ('/api/2.0/mlflow/model-versions/create', 'POST'), <class 'model_registry_pb2.UpdateModelVersion'>: ('/api/2.0/mlflow/model-versions/update', 'PATCH'), <class 'model_registry_pb2.TransitionModelVersionStage'>: ('/api/2.0/mlflow/model-versions/transition-stage', 'POST'), <class 'model_registry_pb2.DeleteModelVersion'>: ('/api/2.0/mlflow/model-versions/delete', 'DELETE'), <class 'model_registry_pb2.GetModelVersion'>: ('/api/2.0/mlflow/model-versions/get', 'GET'), <class 'model_registry_pb2.SearchModelVersions'>: ('/api/2.0/mlflow/model-versions/search', 'GET'), <class 'model_registry_pb2.GetModelVersionDownloadUri'>: ('/api/2.0/mlflow/model-versions/get-download-uri', 'GET'), <class 'model_registry_pb2.SetRegisteredModelTag'>: ('/api/2.0/mlflow/registered-models/set-tag', 'POST')}

{<class 'model_registry_pb2.CreateRegisteredModel'>: ('/api/2.0/mlflow/registered-models/create', 'POST'), <class 'model_registry_pb2.RenameRegisteredModel'>: ('/api/2.0/mlflow/registered-models/rename', 'POST'), <class 'model_registry_pb2.UpdateRegisteredModel'>: ('/api/2.0/mlflow/registered-models/update', 'PATCH'), <class 'model_registry_pb2.DeleteRegisteredModel'>: ('/api/2.0/mlflow/registered-models/delete', 'DELETE'), <class 'model_registry_pb2.GetRegisteredModel'>: ('/api/2.0/mlflow/registered-models/get', 'GET'), <class 'model_registry_pb2.SearchRegisteredModels'>: ('/api/2.0/mlflow/registered-models/search', 'GET'), <class 'model_registry_pb2.GetLatestVersions'>: ('/api/2.0/mlflow/registered-models/get-latest-versions', 'POST'), <class 'model_registry_pb2.CreateModelVersion'>: ('/api/2.0/mlflow/model-versions/create', 'POST'), <class 'model_registry_pb2.UpdateModelVersion'>: ('/api/2.0/mlflow/model-versions/update', 'PATCH'), <class 'model_registry_pb2.TransitionModelVersionStage'>: ('/api/2.0/mlflow/model-versions/transition-stage', 'POST'), <class 'model_registry_pb2.DeleteModelVersion'>: ('/api/2.0/mlflow/model-versions/delete', 'DELETE'), <class 'model_registry_pb2.GetModelVersion'>: ('/api/2.0/mlflow/model-versions/get', 'GET'), <class 'model_registry_pb2.SearchModelVersions'>: ('/api/2.0/mlflow/model-versions/search', 'GET'), <class 'model_registry_pb2.GetModelVersionDownloadUri'>: ('/api/2.0/mlflow/model-versions/get-download-uri', 'GET'), <class 'model_registry_pb2.SetRegisteredModelTag'>: ('/api/2.0/mlflow/registered-models/set-tag', 'POST'), <class 'model_registry_pb2.SetModelVersionTag'>: ('/api/2.0/mlflow/model-versions/set-tag', 'POST')}

{<class 'model_registry_pb2.CreateRegisteredModel'>: ('/api/2.0/mlflow/registered-models/create', 'POST'), <class 'model_registry_pb2.RenameRegisteredModel'>: ('/api/2.0/mlflow/registered-models/rename', 'POST'), <class 'model_registry_pb2.UpdateRegisteredModel'>: ('/api/2.0/mlflow/registered-models/update', 'PATCH'), <class 'model_registry_pb2.DeleteRegisteredModel'>: ('/api/2.0/mlflow/registered-models/delete', 'DELETE'), <class 'model_registry_pb2.GetRegisteredModel'>: ('/api/2.0/mlflow/registered-models/get', 'GET'), <class 'model_registry_pb2.SearchRegisteredModels'>: ('/api/2.0/mlflow/registered-models/search', 'GET'), <class 'model_registry_pb2.GetLatestVersions'>: ('/api/2.0/mlflow/registered-models/get-latest-versions', 'POST'), <class 'model_registry_pb2.CreateModelVersion'>: ('/api/2.0/mlflow/model-versions/create', 'POST'), <class 'model_registry_pb2.UpdateModelVersion'>: ('/api/2.0/mlflow/model-versions/update', 'PATCH'), <class 'model_registry_pb2.TransitionModelVersionStage'>: ('/api/2.0/mlflow/model-versions/transition-stage', 'POST'), <class 'model_registry_pb2.DeleteModelVersion'>: ('/api/2.0/mlflow/model-versions/delete', 'DELETE'), <class 'model_registry_pb2.GetModelVersion'>: ('/api/2.0/mlflow/model-versions/get', 'GET'), <class 'model_registry_pb2.SearchModelVersions'>: ('/api/2.0/mlflow/model-versions/search', 'GET'), <class 'model_registry_pb2.GetModelVersionDownloadUri'>: ('/api/2.0/mlflow/model-versions/get-download-uri', 'GET'), <class 'model_registry_pb2.SetRegisteredModelTag'>: ('/api/2.0/mlflow/registered-models/set-tag', 'POST'), <class 'model_registry_pb2.SetModelVersionTag'>: ('/api/2.0/mlflow/model-versions/set-tag', 'POST'), <class 'model_registry_pb2.DeleteRegisteredModelTag'>: ('/api/2.0/mlflow/registered-models/delete-tag', 'DELETE')}

{<class 'model_registry_pb2.CreateRegisteredModel'>: ('/api/2.0/mlflow/registered-models/create', 'POST'), <class 'model_registry_pb2.RenameRegisteredModel'>: ('/api/2.0/mlflow/registered-models/rename', 'POST'), <class 'model_registry_pb2.UpdateRegisteredModel'>: ('/api/2.0/mlflow/registered-models/update', 'PATCH'), <class 'model_registry_pb2.DeleteRegisteredModel'>: ('/api/2.0/mlflow/registered-models/delete', 'DELETE'), <class 'model_registry_pb2.GetRegisteredModel'>: ('/api/2.0/mlflow/registered-models/get', 'GET'), <class 'model_registry_pb2.SearchRegisteredModels'>: ('/api/2.0/mlflow/registered-models/search', 'GET'), <class 'model_registry_pb2.GetLatestVersions'>: ('/api/2.0/mlflow/registered-models/get-latest-versions', 'POST'), <class 'model_registry_pb2.CreateModelVersion'>: ('/api/2.0/mlflow/model-versions/create', 'POST'), <class 'model_registry_pb2.UpdateModelVersion'>: ('/api/2.0/mlflow/model-versions/update', 'PATCH'), <class 'model_registry_pb2.TransitionModelVersionStage'>: ('/api/2.0/mlflow/model-versions/transition-stage', 'POST'), <class 'model_registry_pb2.DeleteModelVersion'>: ('/api/2.0/mlflow/model-versions/delete', 'DELETE'), <class 'model_registry_pb2.GetModelVersion'>: ('/api/2.0/mlflow/model-versions/get', 'GET'), <class 'model_registry_pb2.SearchModelVersions'>: ('/api/2.0/mlflow/model-versions/search', 'GET'), <class 'model_registry_pb2.GetModelVersionDownloadUri'>: ('/api/2.0/mlflow/model-versions/get-download-uri', 'GET'), <class 'model_registry_pb2.SetRegisteredModelTag'>: ('/api/2.0/mlflow/registered-models/set-tag', 'POST'), <class 'model_registry_pb2.SetModelVersionTag'>: ('/api/2.0/mlflow/model-versions/set-tag', 'POST'), <class 'model_registry_pb2.DeleteRegisteredModelTag'>: ('/api/2.0/mlflow/registered-models/delete-tag', 'DELETE'), <class 'model_registry_pb2.DeleteModelVersionTag'>: ('/api/2.0/mlflow/model-versions/delete-tag', 'DELETE')}

{<class 'model_registry_pb2.CreateRegisteredModel'>: ('/api/2.0/mlflow/registered-models/create', 'POST'), <class 'model_registry_pb2.RenameRegisteredModel'>: ('/api/2.0/mlflow/registered-models/rename', 'POST'), <class 'model_registry_pb2.UpdateRegisteredModel'>: ('/api/2.0/mlflow/registered-models/update', 'PATCH'), <class 'model_registry_pb2.DeleteRegisteredModel'>: ('/api/2.0/mlflow/registered-models/delete', 'DELETE'), <class 'model_registry_pb2.GetRegisteredModel'>: ('/api/2.0/mlflow/registered-models/get', 'GET'), <class 'model_registry_pb2.SearchRegisteredModels'>: ('/api/2.0/mlflow/registered-models/search', 'GET'), <class 'model_registry_pb2.GetLatestVersions'>: ('/api/2.0/mlflow/registered-models/get-latest-versions', 'POST'), <class 'model_registry_pb2.CreateModelVersion'>: ('/api/2.0/mlflow/model-versions/create', 'POST'), <class 'model_registry_pb2.UpdateModelVersion'>: ('/api/2.0/mlflow/model-versions/update', 'PATCH'), <class 'model_registry_pb2.TransitionModelVersionStage'>: ('/api/2.0/mlflow/model-versions/transition-stage', 'POST'), <class 'model_registry_pb2.DeleteModelVersion'>: ('/api/2.0/mlflow/model-versions/delete', 'DELETE'), <class 'model_registry_pb2.GetModelVersion'>: ('/api/2.0/mlflow/model-versions/get', 'GET'), <class 'model_registry_pb2.SearchModelVersions'>: ('/api/2.0/mlflow/model-versions/search', 'GET'), <class 'model_registry_pb2.GetModelVersionDownloadUri'>: ('/api/2.0/mlflow/model-versions/get-download-uri', 'GET'), <class 'model_registry_pb2.SetRegisteredModelTag'>: ('/api/2.0/mlflow/registered-models/set-tag', 'POST'), <class 'model_registry_pb2.SetModelVersionTag'>: ('/api/2.0/mlflow/model-versions/set-tag', 'POST'), <class 'model_registry_pb2.DeleteRegisteredModelTag'>: ('/api/2.0/mlflow/registered-models/delete-tag', 'DELETE'), <class 'model_registry_pb2.DeleteModelVersionTag'>: ('/api/2.0/mlflow/model-versions/delete-tag', 'DELETE'), <class 'model_registry_pb2.SetRegisteredModelAlias'>: ('/api/2.0/mlflow/registered-models/alias', 'POST')}

{<class 'model_registry_pb2.CreateRegisteredModel'>: ('/api/2.0/mlflow/registered-models/create', 'POST'), <class 'model_registry_pb2.RenameRegisteredModel'>: ('/api/2.0/mlflow/registered-models/rename', 'POST'), <class 'model_registry_pb2.UpdateRegisteredModel'>: ('/api/2.0/mlflow/registered-models/update', 'PATCH'), <class 'model_registry_pb2.DeleteRegisteredModel'>: ('/api/2.0/mlflow/registered-models/delete', 'DELETE'), <class 'model_registry_pb2.GetRegisteredModel'>: ('/api/2.0/mlflow/registered-models/get', 'GET'), <class 'model_registry_pb2.SearchRegisteredModels'>: ('/api/2.0/mlflow/registered-models/search', 'GET'), <class 'model_registry_pb2.GetLatestVersions'>: ('/api/2.0/mlflow/registered-models/get-latest-versions', 'POST'), <class 'model_registry_pb2.CreateModelVersion'>: ('/api/2.0/mlflow/model-versions/create', 'POST'), <class 'model_registry_pb2.UpdateModelVersion'>: ('/api/2.0/mlflow/model-versions/update', 'PATCH'), <class 'model_registry_pb2.TransitionModelVersionStage'>: ('/api/2.0/mlflow/model-versions/transition-stage', 'POST'), <class 'model_registry_pb2.DeleteModelVersion'>: ('/api/2.0/mlflow/model-versions/delete', 'DELETE'), <class 'model_registry_pb2.GetModelVersion'>: ('/api/2.0/mlflow/model-versions/get', 'GET'), <class 'model_registry_pb2.SearchModelVersions'>: ('/api/2.0/mlflow/model-versions/search', 'GET'), <class 'model_registry_pb2.GetModelVersionDownloadUri'>: ('/api/2.0/mlflow/model-versions/get-download-uri', 'GET'), <class 'model_registry_pb2.SetRegisteredModelTag'>: ('/api/2.0/mlflow/registered-models/set-tag', 'POST'), <class 'model_registry_pb2.SetModelVersionTag'>: ('/api/2.0/mlflow/model-versions/set-tag', 'POST'), <class 'model_registry_pb2.DeleteRegisteredModelTag'>: ('/api/2.0/mlflow/registered-models/delete-tag', 'DELETE'), <class 'model_registry_pb2.DeleteModelVersionTag'>: ('/api/2.0/mlflow/model-versions/delete-tag', 'DELETE'), <class 'model_registry_pb2.SetRegisteredModelAlias'>: ('/api/2.0/mlflow/registered-models/alias', 'POST'), <class 'model_registry_pb2.DeleteRegisteredModelAlias'>: ('/api/2.0/mlflow/registered-models/alias', 'DELETE')}

{<class 'model_registry_pb2.CreateRegisteredModel'>: ('/api/2.0/mlflow/registered-models/create', 'POST'), <class 'model_registry_pb2.RenameRegisteredModel'>: ('/api/2.0/mlflow/registered-models/rename', 'POST'), <class 'model_registry_pb2.UpdateRegisteredModel'>: ('/api/2.0/mlflow/registered-models/update', 'PATCH'), <class 'model_registry_pb2.DeleteRegisteredModel'>: ('/api/2.0/mlflow/registered-models/delete', 'DELETE'), <class 'model_registry_pb2.GetRegisteredModel'>: ('/api/2.0/mlflow/registered-models/get', 'GET'), <class 'model_registry_pb2.SearchRegisteredModels'>: ('/api/2.0/mlflow/registered-models/search', 'GET'), <class 'model_registry_pb2.GetLatestVersions'>: ('/api/2.0/mlflow/registered-models/get-latest-versions', 'POST'), <class 'model_registry_pb2.CreateModelVersion'>: ('/api/2.0/mlflow/model-versions/create', 'POST'), <class 'model_registry_pb2.UpdateModelVersion'>: ('/api/2.0/mlflow/model-versions/update', 'PATCH'), <class 'model_registry_pb2.TransitionModelVersionStage'>: ('/api/2.0/mlflow/model-versions/transition-stage', 'POST'), <class 'model_registry_pb2.DeleteModelVersion'>: ('/api/2.0/mlflow/model-versions/delete', 'DELETE'), <class 'model_registry_pb2.GetModelVersion'>: ('/api/2.0/mlflow/model-versions/get', 'GET'), <class 'model_registry_pb2.SearchModelVersions'>: ('/api/2.0/mlflow/model-versions/search', 'GET'), <class 'model_registry_pb2.GetModelVersionDownloadUri'>: ('/api/2.0/mlflow/model-versions/get-download-uri', 'GET'), <class 'model_registry_pb2.SetRegisteredModelTag'>: ('/api/2.0/mlflow/registered-models/set-tag', 'POST'), <class 'model_registry_pb2.SetModelVersionTag'>: ('/api/2.0/mlflow/model-versions/set-tag', 'POST'), <class 'model_registry_pb2.DeleteRegisteredModelTag'>: ('/api/2.0/mlflow/registered-models/delete-tag', 'DELETE'), <class 'model_registry_pb2.DeleteModelVersionTag'>: ('/api/2.0/mlflow/model-versions/delete-tag', 'DELETE'), <class 'model_registry_pb2.SetRegisteredModelAlias'>: ('/api/2.0/mlflow/registered-models/alias', 'POST'), <class 'model_registry_pb2.DeleteRegisteredModelAlias'>: ('/api/2.0/mlflow/registered-models/alias', 'DELETE'), <class 'model_registry_pb2.GetModelVersionByAlias'>: ('/api/2.0/mlflow/registered-models/alias', 'GET')}

[method: "POST"path: "/mlflow/registered-models/create"since {  major: 2  minor: 0}]

[method: "POST"path: "/mlflow/registered-models/rename"since {  major: 2  minor: 0}]

[method: "PATCH"path: "/mlflow/registered-models/update"since {  major: 2  minor: 0}]

[method: "DELETE"path: "/mlflow/registered-models/delete"since {  major: 2  minor: 0}]

[method: "GET"path: "/mlflow/registered-models/get"since {  major: 2  minor: 0}]

[method: "GET"path: "/mlflow/registered-models/search"since {  major: 2  minor: 0}]

[method: "POST"path: "/mlflow/registered-models/get-latest-versions"since {  major: 2  minor: 0}, method: "GET"path: "/mlflow/registered-models/get-latest-versions"since {  major: 2  minor: 0}]

[method: "POST"path: "/mlflow/model-versions/create"since {  major: 2  minor: 0}]

[method: "PATCH"path: "/mlflow/model-versions/update"since {  major: 2  minor: 0}]

[method: "POST"path: "/mlflow/model-versions/transition-stage"since {  major: 2  minor: 0}]

[method: "DELETE"path: "/mlflow/model-versions/delete"since {  major: 2  minor: 0}]

[method: "GET"path: "/mlflow/model-versions/get"since {  major: 2  minor: 0}]

[method: "GET"path: "/mlflow/model-versions/search"since {  major: 2  minor: 0}]

[method: "GET"path: "/mlflow/model-versions/get-download-uri"since {  major: 2  minor: 0}]

[method: "POST"path: "/mlflow/registered-models/set-tag"since {  major: 2  minor: 0}]

[method: "POST"path: "/mlflow/model-versions/set-tag"since {  major: 2  minor: 0}]

[method: "DELETE"path: "/mlflow/registered-models/delete-tag"since {  major: 2  minor: 0}]

[method: "DELETE"path: "/mlflow/model-versions/delete-tag"since {  major: 2  minor: 0}]

[method: "POST"path: "/mlflow/registered-models/alias"since {  major: 2  minor: 0}]

[method: "DELETE"path: "/mlflow/registered-models/alias"since {  major: 2  minor: 0}]

[method: "GET"path: "/mlflow/registered-models/alias"since {  major: 2  minor: 0}]