Repository navigation
Fix: Prevent rich from swallowing Configuration objects in CLI output - #723
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adjusts Configuration.__repr__ so CLI output rendered via rich (e.g., adb config ls) no longer gets interpreted as Rich markup and swallowed in wide/unconstrained terminals (notably in Google Colab), addressing #461.
Changes:
- Update
Configuration.__repr__to wrap the representation in angle brackets (<...>) instead of square brackets ([...]) to avoid Rich markup parsing.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
luisremis
approved these changes
May 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces square brackets with angle brackets in
Configuration.__repr__.Verification
Fixes a bug where
adb config lsin Google Colab (and other environments with wide or unconstrained terminal widths) printed blank lines. The issue occurred becauserich.console.Consoleparses strings wrapped in[and]as markup tags. When the repr of the configuration object was embedded within dictionary output byconsole.log, the entire configuration string was treated as an unclosed/invalid styling tag and subsequently swallowed without error.By matching standard Python representation semantics (using
<and>), we avoid clashes withrich's markdown engine.Fixes #461.