Skip to content

Only abbreviate variable lists when it shortens them - #2537

Open
lgoettgens wants to merge 1 commit into
Nemocas:masterfrom
lgoettgens:claude/abstractalgebra-issue-1808-63c64d
Open

lgoettgens wants to merge 1 commit into
Nemocas:masterfrom
lgoettgens:claude/abstractalgebra-issue-1808-63c64d

Conversation

@lgoettgens

Copy link
Copy Markdown
Member

Closes #1808.

The new internal helper print_abbreviated_list now 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 show methods of MPolyRing, FreeAssociativeAlgebra, LaurentMPolyRing, MSeriesRing and PuiseuxMPolyRing.

🤖 Created with the help of Claude Code (Opus 5.5)

`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

codecov Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.35%. Comparing base (6dce9f6) to head (ad80615).
⚠️ Report is 3 commits behind head on master.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@fingolfin fingolfin added the release notes: not needed PRs introducing changes that are wholly irrelevant to the release notes label Sep 24, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release notes: not needed PRs introducing changes that are wholly irrelevant to the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Be more clever about abbreviating variable lists

2 participants