Skip to content
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

[bug] jedi: IndentationError: unexpected indent #223

Open
Freed-Wu opened this issue Aug 24, 2022 · 5 comments
Open

[bug] jedi: IndentationError: unexpected indent #223

Freed-Wu opened this issue Aug 24, 2022 · 5 comments

Comments

@Freed-Wu
Copy link

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
Copy link
Owner

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
Copy link
Owner

Related to: #187

@Freed-Wu
Copy link
Author

Okay!

@pappasam
Copy link
Owner

@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!

@pappasam pappasam reopened this Aug 24, 2022
@PeterJCLaw
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants