Skip to content

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

Merged
charliermarsh merged 2 commits intoastral-sh:mainfrom
dylwil3:decimal-redux
Nov 9, 2024
Merged

[refurb] Further special cases added to verbose-decimal-constructor (FURB157)#14216
charliermarsh merged 2 commits intoastral-sh:mainfrom
dylwil3:decimal-redux

Conversation

@dylwil3
Copy link
Copy Markdown
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

@github-actions
Copy link
Copy Markdown
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
@dylwil3 dylwil3 deleted the decimal-redux branch November 9, 2024 04:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in 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