Only abbreviate variable lists when it shortens them - #2537
Open
lgoettgens wants to merge 1 commit into
Open
lgoettgens wants to merge 1 commit into
lgoettgens wants to merge 1 commit into
Conversation
`x, y, u, v, t, s` was printed as `x, y, u, v, ..., s`, which is longer. Move the five copies of the abbreviation code into `print_abbreviated_list`, which skips a single omitted entry unless it is wider than `...`. Assisted-by: Claude Code (Opus 5.5)
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2537 +/- ##
=======================================
Coverage 88.34% 88.35%
=======================================
Files 131 131
Lines 33306 33287 -19
=======================================
- Hits 29424 29410 -14
+ Misses 3882 3877 -5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
fingolfin
approved these changes
Sep 24, 2026
This branch has not been deployed
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.
Closes #1808.
The new internal helper
print_abbreviated_listnow prints all names unless leaving some out makes the output shorter. With 6 names, the 5th is left out only if it is wider than.... With 7 or more names, the output never gets longer.The helper replaces 5 identical copies of the old code in the
showmethods ofMPolyRing,FreeAssociativeAlgebra,LaurentMPolyRing,MSeriesRingandPuiseuxMPolyRing.🤖 Created with the help of Claude Code (Opus 5.5)