-
Notifications
You must be signed in to change notification settings - Fork 191
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
RemoveImportsVisitor crashes when parsing Literal["r+"] #924
Comments
zsol
added
bug
Something isn't working
codemod
Bundled codemods, visitors, metadata providers
labels
May 25, 2023
This also fails when parsing
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://peps.python.org/pep-0586/#shortening-unions-of-literals
The parser is trying to see if the string "r+" refers to some stringified-type and fails to parse it as an expression, but it should just take "r+" as a literal string.
This crashes in both the python and rust/native parser as of libcst 0.4.9
Repro:
Output:
The text was updated successfully, but these errors were encountered: