LibCST
LibCST copied to clipboard
Native parser crash: Mix of spaces and tabs
The parser seems to crash on even the most trivial mixing of tabs and spaces:
def foo(x):
with x:
pass
The indentation is: 1 tab and 1 space, followed by 2 tabs and 1 space
The error:
>>> import libcst
>>> libcst.parse_module('''\
... def foo(x):
... with x:
... pass
... ''')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/tusharsadhwani/code/marvin-python/venv3/lib/python3.10/site-packages/libcst/_parser/entrypoints.py", line 109, in parse_module
result = _parse(