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

Parse error with backslash before indented block #7799

Closed
tusharsadhwani opened this issue Apr 29, 2024 · 1 comment
Closed

Parse error with backslash before indented block #7799

tusharsadhwani opened this issue Apr 29, 2024 · 1 comment
Labels
addressed in next version Issue is fixed and will appear in next published version bug Something isn't working

Comments

@tusharsadhwani
Copy link

tusharsadhwani commented Apr 29, 2024

Describe the bug

The following code runs fine on Python 3.10+, but pyright fails to parse it.

Spotted from astral-sh/ruff#10099

Code or Screenshots

class Plotter:
\
    pass

VS Code extension or command-line

$ pyright foo.py
/Users/tusharsadhwani/code/black/foo.py
  /Users/tusharsadhwani/code/black/foo.py:3:5 - error: Expected indented block
1 error, 0 warnings, 0 informations 
@tusharsadhwani tusharsadhwani added the bug Something isn't working label Apr 29, 2024
erictraut added a commit that referenced this issue Apr 29, 2024
…n tokenizer in versions 3.10 and newer in the case where a backslash (continuation character) is located by itself on a line. This addresses #7799.
@erictraut erictraut added the addressed in next version Issue is fixed and will appear in next published version label Apr 29, 2024
@erictraut
Copy link
Collaborator

This is addressed in pyright 1.1.361, which I just published.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addressed in next version Issue is fixed and will appear in next published version bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants