• 
      
    Fish Trophy

    david got a fish trophy!

    Fish Trophy

    Add rich to RBTools and replace old modules.

    Review Request #15151 — Created July 3, 2026 and updated

    Information

    RBTools
    master

    Reviewers

    This change adds the rich library as a dependency, and creates the
    basic framework for rich output. This is based on a combination of
    Christian and my previous attempts at this work.

    This creates a new RBToolsConsole which wraps two rich Console objects
    for stdout and stderr. This also includes a few helpers for multi-step
    operations, some basic status levels, progress, spinners, and table
    output. This console is first created in a command's __init__, but
    will get recreated after we parse command-line options in order to
    properly support the new --color=[auto,always,never] option.

    When commands are running in JSON output mode, a handler is pushed onto
    the console that suppresses output. This allows commands to do what
    they've always done: unconditionally write to both stdout/stderr and the
    json output object, and whichever one is expected to run will work. The
    existing output wrappers have also been updated to write through the
    console object, so that can take advantage of the same suppression
    method.

    All uses of the old colorama, tqdm, and texttable libraries have
    been replaced with the new rich output, but I've held off on other
    output prettification for a separate change.

    • Ran unit tests.
    • Tested the various values of the --color option, the COLOR_MODE
      config key, and the NO_COLOR and FORCE_COLOR environment variables.
    • Tested rich output for the info, install, post, and status
      commands.
    Summary ID
    Add rich to RBTools and replace old modules.
    This change adds the `rich` library as a dependency, and creates the basic framework for rich output. This is based on a combination of Christian and my previous attempts at this work. This creates a new RBToolsConsole which wraps two rich `Console` objects for stdout and stderr. This also includes a few helpers for multi-step operations, some basic status levels, progress, spinners, and table output. This console is first created in a command's `__init__`, but will get recreated after we parse command-line options in order to properly support the new `--color=[auto,always,never]` option. When commands are running in JSON output mode, a handler is pushed onto the console that suppresses output. This allows commands to do what they've always done: unconditionally write to both stdout/stderr and the json output object, and whichever one is expected to run will work. The existing output wrappers have also been updated to write through the console object, so that can take advantage of the same suppression method. All uses of the old `colorama`, `tqdm`, and `texttable` libraries have been replaced with the new rich output, but I've held off on other output prettification for a separate change. Testing Done: - Ran unit tests. - Tested the various values of the `--color` option, the `COLOR_MODE` config key, and the `NO_COLOR` and `FORCE_COLOR` environment variables. - Tested rich output for the `info`, `install`, `post`, and `status` commands.
    kmrpxswxxprsrnyspyktlqwrrvwoxzuw
    Description From Last Updated

    'rich.table.Table' imported but unused Column: 1 Error code: F401

    reviewbot reviewbot

    'collections.abc.Sequence' imported but unused Column: 5 Error code: F401

    reviewbot reviewbot
    Checks run (1 failed, 1 succeeded)
    flake8 failed.
    JSHint passed.

    flake8

    david
    david
    Review request changed
    Commits:
    Summary ID
    Add rich to RBTools and replace old modules.
    This change adds the `rich` library as a dependency, and creates the basic framework for rich output. This is based on a combination of Christian and my previous attempts at this work. This creates a new RBToolsConsole which wraps two rich `Console` objects for stdout and stderr. This also includes a few helpers for multi-step operations, some basic status levels, progress, spinners, and table output. This console is first created in a command's `__init__`, but will get recreated after we parse command-line options in order to properly support the new `--color=[auto,always,never]` option. When commands are running in JSON output mode, a handler is pushed onto the console that suppresses output. This allows commands to do what they've always done: unconditionally write to both stdout/stderr and the json output object, and whichever one is expected to run will work. The existing output wrappers have also been updated to write through the console object, so that can take advantage of the same suppression method. All uses of the old `colorama`, `tqdm`, and `texttable` libraries have been replaced with the new rich output, but I've held off on other output prettification for a separate change. Testing Done: - Ran unit tests. - Tested the various values of the `--color` option, the `COLOR_MODE` config key, and the `NO_COLOR` and `FORCE_COLOR` environment variables. - Tested rich output for the `info`, `install`, `post`, and `status` commands.
    kmrpxswxxprsrnyspyktlqwrrvwoxzuw
    Add rich to RBTools and replace old modules.
    This change adds the `rich` library as a dependency, and creates the basic framework for rich output. This is based on a combination of Christian and my previous attempts at this work. This creates a new RBToolsConsole which wraps two rich `Console` objects for stdout and stderr. This also includes a few helpers for multi-step operations, some basic status levels, progress, spinners, and table output. This console is first created in a command's `__init__`, but will get recreated after we parse command-line options in order to properly support the new `--color=[auto,always,never]` option. When commands are running in JSON output mode, a handler is pushed onto the console that suppresses output. This allows commands to do what they've always done: unconditionally write to both stdout/stderr and the json output object, and whichever one is expected to run will work. The existing output wrappers have also been updated to write through the console object, so that can take advantage of the same suppression method. All uses of the old `colorama`, `tqdm`, and `texttable` libraries have been replaced with the new rich output, but I've held off on other output prettification for a separate change. Testing Done: - Ran unit tests. - Tested the various values of the `--color` option, the `COLOR_MODE` config key, and the `NO_COLOR` and `FORCE_COLOR` environment variables. - Tested rich output for the `info`, `install`, `post`, and `status` commands.
    kmrpxswxxprsrnyspyktlqwrrvwoxzuw

    Checks run (2 succeeded)

    flake8 passed.
    JSHint passed.