Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[refurb] Further special cases added to verbose-decimal-constructor (FURB157) #14216

Merged
merged 2 commits into from
Nov 9, 2024

Conversation

dylwil3
Copy link
Collaborator

@dylwil3 dylwil3 commented Nov 8, 2024

This PR accounts for further subtleties in Decimal parsing:

  • Strings which are empty modulo underscores and surrounding whitespace are skipped
  • Decimal("-0") is skipped
  • Decimal("{integer literal that is longer than 640 digits}") are skipped (see linked issue for explanation)

NB: The snapshot did not need to be updated since the new test cases are "Ok" instances and added below the diff.

Closes #14204

Copy link
Contributor

github-actions bot commented Nov 8, 2024

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@charliermarsh charliermarsh added the bug Something isn't working label Nov 9, 2024
@charliermarsh charliermarsh merged commit b8dc780 into astral-sh:main Nov 9, 2024
20 checks passed
@dylwil3 dylwil3 deleted the decimal-redux branch November 9, 2024 04:05
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FURB157 has incorrect fixes when replacing strings with integers
2 participants