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

Add default_columns classmethod to Progress class #1894

Merged

Conversation

ptmcg
Copy link
Contributor

@ptmcg ptmcg commented Jan 31, 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

Added new default_columns() classmethod to the Progress class, so that client code does not need to replicate the defaults literally, but can just add *Progress.default_columns()

Copy link
Collaborator

@willmcgugan willmcgugan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! Just a request for name and docstring.

rich/progress.py Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Jan 31, 2022

Codecov Report

Merging #1894 (76e234b) into master (e839bfb) will decrease coverage by 0.02%.
The diff coverage is 99.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1894      +/-   ##
==========================================
- Coverage   99.82%   99.80%   -0.03%     
==========================================
  Files          71       71              
  Lines        6943     7035      +92     
==========================================
+ Hits         6931     7021      +90     
- Misses         12       14       +2     
Flag Coverage Δ
unittests 99.80% <99.00%> (-0.03%) ⬇️

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/syntax.py 99.27% <97.72%> (-0.34%) ⬇️
rich/pretty.py 99.71% <98.88%> (-0.29%) ⬇️
rich/__main__.py 100.00% <100.00%> (ø)
rich/_inspect.py 100.00% <100.00%> (ø)
rich/console.py 100.00% <100.00%> (ø)
rich/progress.py 98.13% <100.00%> (+0.01%) ⬆️
rich/segment.py 99.34% <100.00%> (+0.05%) ⬆️
rich/table.py 100.00% <100.00%> (ø)
rich/traceback.py 99.55% <100.00%> (ø)
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 633faab...76e234b. Read the comment docs.

@ptmcg
Copy link
Contributor Author

ptmcg commented Feb 2, 2022

This should be ready whenever you are. Unless you have further comments, I'll assume this is in your queue for the next release.

@willmcgugan
Copy link
Collaborator

Thanks!

@willmcgugan willmcgugan merged commit b595887 into Textualize:master Feb 4, 2022
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Feb 21, 2022
11.2.0

Added

Add support for US spelling of "gray" in ANSI color names Textualize/rich#1890
Added rich.diagnose.report to expose environment debugging logic as function Textualize/rich#1917
Added classmethod Progress.get_default_columns() to get the default list of progress bar columns Textualize/rich#1894

Fixed

Fixed performance issue in measuring text
Fixed test failures on PyPy3 Textualize/rich#1904
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.

None yet

3 participants