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

Make repr tag highlighting greedy #2565

Merged
merged 6 commits into from Oct 11, 2022
Merged

Conversation

davep
Copy link
Contributor

@davep davep commented Oct 10, 2022

Addressing #2468; before this change the tag-matching code was non-greedy, resulting in an unbalanced match if there were tags within tags. This change makes this greedy to ensure that there's a better chance of the match being balanced.

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

Please describe your changes here. If this fixes a bug, please link to the issue, if possible.

@codecov-commenter
Copy link

codecov-commenter commented Oct 11, 2022

Codecov Report

Base: 98.39% // Head: 98.39% // Decreases project coverage by -0.00% ⚠️

Coverage data is based on head (4df597e) compared to base (6e953c6).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2565      +/-   ##
==========================================
- Coverage   98.39%   98.39%   -0.01%     
==========================================
  Files          63       63              
  Lines        6806     6797       -9     
==========================================
- Hits         6697     6688       -9     
  Misses        109      109              
Flag Coverage Δ
unittests 98.39% <ø> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
rich/_null_file.py 100.00% <ø> (ø)
rich/rule.py 100.00% <ø> (ø)

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

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@davep
Copy link
Contributor Author

davep commented Oct 11, 2022

Does this deserve an entry in the CHANGELOG and, if so, what's the best method of adding it knowing that the major version will bump due to #2567?

@willmcgugan
Copy link
Collaborator

Great. Please add a test for this.

@davep davep linked an issue Oct 11, 2022 that may be closed by this pull request
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.

LGTM

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.

[BUG] rich.pretty.pprint is too eager to highlight a closing >
3 participants