Repository navigation
Print ttp status's AppArmor, VPN and diagnostic lines without raw markup - #190
Merged
Merged
Conversation
Three lines of `ttp status` passed markup=False so that their values (an AppArmor profile name, a VPN state, a diagnostic message) could not be read as Rich markup. That also turned off the markup of the [TTP] prefix, so they printed `[bold cyan]\[TTP][/bold cyan] …` literally. Markup stays on now and only the values go through rich.markup.escape. The tests assert the rendered prefix and a bracketed value shown as is; they failed before the change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: onyks-os <129986281+onyks-os@users.noreply.github.com>
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.
Three lines of
ttp statusprinted the prefix as raw Rich markup,[bold cyan]\[TTP][/bold cyan] …:Tor AppArmorRequired VPNThey passed
markup=Falseso that their values could not be read as markup, and that also turned off the markup of the[TTP]prefix. Markup now stays on, and only the values (profile name, VPN state, diagnostic reason and message) go throughrich.markup.escape.Tests
test_status_renders_the_apparmor_line_and_shows_its_values_literallyuses the profile[red]ttp-tor. It requires the rendered prefix and the bracketed value printed as is.test_status_displays_vpn_guard_without_claiming_remote_livenessnow asserts the rendered prefix on the VPN and diagnostic lines.Both tests failed before the change. The VPN test is the one that found the diagnostic line.
🤖 Generated with Claude Code