Skip to content

refactor: Replace bcolors with rich for all terminal output#9

Merged
haugoug merged 1 commit intogvsoc:mainfrom
germainh512:drop-bcolors
Mar 9, 2026
Merged

refactor: Replace bcolors with rich for all terminal output#9
haugoug merged 1 commit intogvsoc:mainfrom
germainh512:drop-bcolors

Conversation

@germainh512
Copy link

Removes the bcolors class (manual ANSI escape codes). All terminal styling now uses rich.

Changes

  • reporting.py: Removed bcolors class entirely
  • tests.py: Start/end banners use rich.Console.print() with markup ([blue], [green], [red], etc.)
  • runner.py: Error messages no longer embed ANSI codes

Why

  • Consistent styling through one library
  • rich is terminal-aware (auto-disables colors when output is piped/redirected)
  • Less code (27 lines deleted)

122 tests passing.

- Removed bcolors class from reporting.py
- Test start/end banners in tests.py now use rich Console with markup
- Error messages in runner.py no longer embed ANSI codes
- All terminal styling now goes through rich (consistent, terminal-aware)

122 tests passing.
@haugoug haugoug merged commit 81682d0 into gvsoc:main Mar 9, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants