-
Notifications
You must be signed in to change notification settings - Fork 895
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
[3.10] lib2to3.pgen2.parse.ParseError with match expression #966
Comments
Apparently this is just the consequence of python moving to a PEG parser and the parser used in lib2to3 cannot parse PEG grammar. |
Grammar.txt hack just to make parsing work
|
Hi @char101, I've just stumbled across your hack. Where should |
Modifying Grammar.txt is not enough, we need to port blib2to3 from black and use it as the ast parser. For example you can see the modifications I made in |
Unfortunately your version doesn't work for me as I'm running on python 3.10.2 and so it tries to load up a 3.10.2 pickle file directly.
|
Just rename the existing pickle files from 3.10.0 to 3.10.2. |
Hi,
Yapf throws exception when validating match expression in python 3.10.0rc2.
Test file:
Python output:
Yapf Output:
The text was updated successfully, but these errors were encountered: