pappasam / jedi-language-server

A Python language server exclusively for Jedi. If Jedi supports it well, this language server should too.
MIT License
572 stars 44 forks source link

[bug] jedi: IndentationError: unexpected indent #223

Open Freed-Wu opened 1 year ago

Freed-Wu commented 1 year ago

test.py can work nornally. However, jedi-language-server will give an error: jedi: IndentationError: unexpected indent

with (
    open("LICENSE") as f,
    open("README.md") as g,
):
    pass

Screenshot from 2022-08-24 13-51-06

pappasam commented 1 year ago

Thanks for the report! This is an upstream issue with Jedi, I suggest filing this issue in the Jedi repo: https://github.com/davidhalter/jedi/issues

For context, the above syntax is new in Python 3.10 and (apparently) hasn't been added to Jedi yet: https://docs.python.org/3/whatsnew/3.10.html#parenthesized-context-managers

pappasam commented 1 year ago

Related to: https://github.com/pappasam/jedi-language-server/issues/187

Freed-Wu commented 1 year ago

Okay!

pappasam commented 1 year ago

@Freed-Wu let's keep this issue open as well, it's still a problem for this project. We're just waiting on a fix from Jedi!

PeterJCLaw commented 10 months ago

Is this issue still present? I believe the cause of this was that the Python 3.10 grammars hadn't been updated with the new syntax, though I think that that's now happened and the latest version of Jedi (0.19 at the time of writing) has syntax for versions up to 3.11.