Skip to content

Fix f-string conversion specifiers on Python 3.12+ - #501

Open
Souravrajvi0 wants to merge 1 commit into
BerkeleyLearnVerify:mainfrom
Souravrajvi0:feat/fix-fstring-conversion-e7f7
Open

Fix f-string conversion specifiers on Python 3.12+#501
Souravrajvi0 wants to merge 1 commit into
BerkeleyLearnVerify:mainfrom
Souravrajvi0:feat/fix-fstring-conversion-e7f7

Conversation

@Souravrajvi0

Copy link
Copy Markdown

Description

Fix parser crash on f-string conversion specifiers (!r, !s, !a) under Python 3.12+.

Issue Link

Fixes #464

Checklist

  • I have tested the changes locally via pytest and/or other means
  • I have added or updated relevant documentation
  • I have autoformatted the code with black and isort
  • I have added test cases (if applicable)

Additional Notes

N/A

Use TokenInfo start/end positions in check_fstring_conversion and return
ord() of the conversion character for ast.FormattedValue. Add regression
tests for !r, !s, and !a.
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.

Python 3.12+ parser crash on f-string conversion specifiers like {x!r} in Scenic files

1 participant