Unicode variable names crash yapf
Open
- Dominant language
- Python
- Stars
- 14k
- Forks
- 904
- PR merge metrics
- No merged PRs in 30d
Description
Minimal working example :
```python
def test(x):
Δ=x+2
print(Δ)
test(4)
```
this is legal python3, but yapf breaks and does nothing on a file with unicode variables. As can be seen here: the missing spaces in `Δ=x+2` were not added.
The error comes from lib2to3 (`lib2to3.pgen2.parse.ParseError: bad token: type=58, value='Δ', context=('', (2, 1))`) but I can not say if it is a bug in 2to3, or in yapf.
Contributor guide
Assessment
This issue has not been assessed yet.