Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The ast module in Python 3.9 has some API changes. Quoting [1]: Simplified AST for subscription. Simple indices will be represented by their value, extended slices will be represented as tuples. Index(value) will return a value itself, ExtSlice(slices) will return Tuple(slices, Load()). (Contributed by Serhiy Storchaka in bpo-34822.) [1] https://docs.python.org/3/whatsnew/3.9.html#changes-in-the-python-api isinstance(thing, ast.Index) always return false in Python >= 3.9, so we need to handle... whatever the value is now. ast.expr catches 20 of the remaining 24 failures. The remaining 4 are resolved in the next patch. Fixes: #299
- Loading branch information