Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle 'no_color' Console on legacy Windows platforms #2458

Merged
merged 6 commits into from
Aug 9, 2022

Conversation

darrenburns
Copy link
Member

@darrenburns darrenburns commented Aug 9, 2022

Type of changes

  • Bug fix
  • New feature
  • Documentation / docstrings
  • Tests
  • Other

Checklist

  • I've run the latest black with default args on new code.
  • I've updated CHANGELOG.md and CONTRIBUTORS.md where appropriate.
  • I've added tests for new code.
  • I accept that @willmcgugan may be pedantic in the code review.

Description

The "no_color" parameter of Console was not being respected on legacy Windows mode.
This update strips colour from the Segment buffer if necessary, before passing them into the legacy Windows renderer.

Also updates to Python 3.11b5 (up from b4) in CI.

@codecov-commenter
Copy link

codecov-commenter commented Aug 9, 2022

Codecov Report

Merging #2458 (42afd3a) into master (19e518f) will decrease coverage by 0.07%.
The diff coverage is 95.20%.

@@            Coverage Diff             @@
##           master    #2458      +/-   ##
==========================================
- Coverage   98.71%   98.63%   -0.08%     
==========================================
  Files          73       72       -1     
  Lines        7771     7770       -1     
==========================================
- Hits         7671     7664       -7     
- Misses        100      106       +6     
Flag Coverage Δ
unittests 98.63% <95.20%> (-0.08%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
rich/default_styles.py 100.00% <ø> (ø)
rich/logging.py 100.00% <ø> (ø)
rich/progress.py 92.76% <ø> (ø)
rich/scope.py 100.00% <ø> (ø)
rich/console.py 97.99% <75.00%> (-0.30%) ⬇️
rich/segment.py 98.72% <93.10%> (+<0.01%) ⬆️
rich/_inspect.py 100.00% <100.00%> (ø)
rich/box.py 100.00% <100.00%> (ø)
rich/cells.py 96.05% <100.00%> (-3.95%) ⬇️
rich/color.py 100.00% <100.00%> (ø)
... and 5 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@darrenburns darrenburns marked this pull request as ready for review August 9, 2022 12:49
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.

3 participants