Conversation
rich highlights whatever it prints, so --version emitted the version with escape codes spliced through it and --json emitted syntax-highlighted JSON that did not parse. Both exist to be consumed by other programs, so both now go through plain print. Caught by CI: rich enables colour when it detects a CI terminal, which the local test run never does. The help assertions were reading rendered bytes, which made them depend on colour and width, so they now strip styling before matching. conftest also pins NO_COLOR and a wide COLUMNS so a developer sees the same output the tests do. Also fixes an epilog line still referring to the pre-rename command name.
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.
CI on `main` failed on the initial push. Three help tests passed locally and failed in Actions, which turned out to be surfacing two real bugs rather than flaky tests.
What was broken
rich highlights whatever it prints, and enables colour when it detects a CI terminal:
Both flags exist to be consumed by other programs. Both now go through plain `print`, via a shared `emit_json` helper.
Test fragility behind it
The help assertions read rendered bytes, so they depended on colour and width — `--proxy` stops being a contiguous substring once typer styles it. They now strip styling before matching, and `conftest` pins `NO_COLOR` and a wide `COLUMNS` so a local run sees what CI sees.
Verified green across plain, `CI=true`, `FORCE_COLOR=1`, and `COLUMNS=40`.
Also fixes an epilog line still naming the pre-rename command.
Note
Merging this triggers `release.yml`, which will publish 0.1.0 to PyPI. That version number is permanent once used.