Skip to content

Syntax highlighting issue when @ appears as first character after line continuation when indexing is present #161435

@tillahoffmann

Description

@tillahoffmann

VS Code version

1.62.3

Extension version

v2021.11.1422169775

OS type

macOS

OS version

11.6

Python distribution

Other

Python version

pyenv (installed with brew) in virtual environment (3.8.10)

Language server

Default

Expected behaviour

I would expect syntax highlighting to be the same irrespective of whether the line is broken before or after the @ operator.

Actual behaviour

image

Steps to reproduce

Enter the following code into a new python file.

# Define variables so pylance doesn't complain.
long_variable_name = other_long_variable_name = 1

long_variable_name \
    @ other_long_variable_name['some_index']

long_variable_name @ \
    other_long_variable_name['some_index']

Logs

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

Labels

grammarSyntax highlighting grammarupstream-issue-linkedThis is an upstream issue that has been reported upstream

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions