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
For example:
import ast tree = ast.parse("from x import y") tree.body[0].level = None ast.unparse(tree) # raises
This is very similar to https://bugs.python.org/issue46289 and #30467 cc @isidentical
Note the compiler does seem to allow it, but it's always an int in practice and documented as such
Discovered in typeshed.
The text was updated successfully, but these errors were encountered:
pythongh-92986: Make level of ImportFrom not optional on ASDL
ffa0d95
pythongh-92986: Fix ast.unparse when ImportFrom.level is None
104b84f
This doesn't happen naturally, but is allowed by the ASDL and compiler. We don't want to change ASDL for backward compatibility reasons (python#57645, python#92987)
No branches or pull requests
For example:
This is very similar to https://bugs.python.org/issue46289 and #30467 cc @isidentical
Note the compiler does seem to allow it, but it's always an int in practice and documented as such
Discovered in typeshed.
The text was updated successfully, but these errors were encountered: