parso
parso copied to clipboard
A Python Parser
I've been thinking for a day about how we can possibly implement [PEP 622]() in case of acceptance. While I was thinking, I drafted a piece of code, which might...
I've tried to apply mutmut to PyPDF2 and failed. Initially I thought the issue was with mutmut ( https://github.com/boxed/mutmut/issues/252 ) , but I guess it's a parso bug. ## Minimal...
Added pyproject.toml. Version is now fetched from git tags.
Besides match case, python 3.9 alpha6 / 3.10 also added parenthesized imports and context-managers. Parenthesized imports works no problem in jedi, but parenthesized context managers lead to a syntax error:...
Full pytest output follows: ``` ============================= test session starts ============================== platform linux -- Python 3.10.0b3, pytest-6.2.4, py-1.10.0, pluggy-0.13.1 rootdir: /tmp/parso, configfile: pytest.ini, testpaths: parso, test plugins: case-1.5.3, xprocess-0.17.1, mock-3.6.1, expect-1.1.0,...
Code snippet: ``` python im.convert('1').save(rf'script\temp\{ord(c)}.png') ^ SyntaxError: invalid syntax *jedi* ``` *`rf` - a convenient way of invoiding anomalous backslash in string, isn't it?*
for >> (lambda: [(yield x + 1) for x in seq]) >>> get_errors("(lambda: [(yield x + 1) for x in seq])") [] >>> get_errors("(lambda: [(yield x + 1) for x...
I'm starting to look for a library to do source transformations and I _think_ parso could handle it via its [`parso.Grammar.refactor()` method](https://parso.readthedocs.io/en/latest/docs/usage.html#parso.Grammar.refactor), but there's not docs on how to use...
yield in lambdas mishandled see https://github.com/pybpc/f2format/issues/17
Hi, tests fail with python 3.12.1 ```python $ python3.12 -m pytest test/ ==================================================================== test session starts ==================================================================== platform linux -- Python 3.12.1, pytest-7.4.4, pluggy-1.3.0 rootdir: /build/parso configfile: pytest.ini collected 1348...