-
-
Notifications
You must be signed in to change notification settings - Fork 34.5k
gh-67790: Support float-style formatting for Fraction instances #100161
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
8cf8d31
Add '.f' formatting for Fraction objects
mdickinson e9db697
Add support for % and F format specifiers
mdickinson 6491b04
Add support for 'z' flag
mdickinson 4551468
Tidy up of business logic
mdickinson 43d34fc
Add support for 'e' presentation type
mdickinson f8dfcb9
Add support for 'g' presentation type; tidy
mdickinson 6bfbc6c
Tidying
mdickinson 48629b7
Add news entry
mdickinson 3d21af2
Add documentation
mdickinson c86a57e
Add what's new entry
mdickinson b521efb
Fix backticks:
mdickinson aac576e
Fix more missing backticks
mdickinson b9ee0ff
Fix indentation
mdickinson 1c8b8a9
Wordsmithing for consistency with other method definitions
mdickinson 9dbde3b
Add link to the format specification mini-language
mdickinson 2dd48bb
Fix: not true that thousands separators cannot have an effect for the…
mdickinson 983726f
Fix typo in comment
mdickinson b7e5129
Tweak docstring and comments for _round_to_exponent
mdickinson cb5e234
Second pass on docstring and comments for _round_to_figures
mdickinson 907487e
Add tests for the corner case of zero minimum width + alignment
mdickinson aba35f3
Tests for the case of zero padding _and_ a zero minimum width
mdickinson fc4d3b5
Cleanup of __format__ method
mdickinson 4ccdf94
Add test cases from original issue and discussion thread
mdickinson b358b37
Merge branch 'main' into fraction-format
mdickinson 67e020c
Tighten up the regex - extra leading zeros not permitted
mdickinson e240c70
Merge remote-tracking branch 'mdickinson/fraction-format' into fracti…
mdickinson 111c41f
Add tests for a few more fill character corner cases
mdickinson d8cc3d6
Merge remote-tracking branch 'upstream/main' into fraction-format
mdickinson fff3751
Add testcases for no presentation type with an integral fraction
mdickinson 0b8bfa6
Rename the regex to allow for future API expansion
mdickinson 54ed402
Tweak comment
mdickinson e3a5fd2
Tweak algorithm comments
mdickinson 098d34c
Fix incorrect acceptance of Z instead of z
mdickinson 2c476a2
Use consistent quote style in tests
mdickinson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Tidying
- Loading branch information
commit 6bfbc6c10087b6604e884bf1f10113247ce45f76
There are no files selected for viewing
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
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
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.
Uh oh!
There was an error while loading. Please reload this page.