Skip to content

2256 as ratio#2268

Open
mutricyl wants to merge 8 commits intohgrecco:masterfrom
mutricyl:2256_as_ratio
Open

2256 as ratio#2268
mutricyl wants to merge 8 commits intohgrecco:masterfrom
mutricyl:2256_as_ratio

Conversation

@mutricyl
Copy link
Contributor

@mutricyl mutricyl commented Feb 9, 2026

  • Closes Be able to use as_ratio option in PrettyFormatter #2256 (insert issue number)

  • Executed pre-commit run --all-files or pixi run lint --all-files with no errors

  • The change is fully covered by automated unit tests

  • Documented in docs/ as appropriate

  • Added an entry to the CHANGES file

  • as_ratio option allowed in all formatters

  • new unit modifier to go for negative exponents instead of ratio: §

  • remove duplicated code from pint.formatting.format (delegates.formatter._format_helpers.format used instead)

  • correct docstring of delegates.formatter._format_helpers.format

@codspeed-hq
Copy link

codspeed-hq bot commented Feb 9, 2026

CodSpeed Performance Report

Merging this PR will not alter performance

Comparing mutricyl:2256_as_ratio (c5c589e) with master (6049a9c)

Summary

✅ 448 untouched benchmarks

@andrewgsavage
Copy link
Collaborator

Could you use a symbol that's more commonly on keyboards, ie not §? ^ would be good since this affects exponents

@mutricyl
Copy link
Contributor Author

mutricyl commented Feb 16, 2026 via email

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.

Be able to use as_ratio option in PrettyFormatter

2 participants