sourcery-ai / sourcery

Instant AI code reviews
https://sourcery.ai
MIT License
1.53k stars 66 forks source link

Error is raised in `match` statements in Python 3.10 #258

Closed ruancomelli closed 1 year ago

ruancomelli commented 2 years ago

Issue description or question

Issue reported to our e-mail support.

The match statement, introduced in Python 3.10, causes Sourcery to throw the following error:

[Error - 6:28:41 PM] Request textDocument/hover failed.

  Message: File "<unknown>", line 2

    match separation_type:

IndentationError: unexpected indent

  Code: -32602

[object Object]

Sourcery Version

0.12.3

Code editor or IDE name and version

VS Code 1.69.2

OS name and version

Ubuntu, connected to via SSH from MacOS

Hellebore commented 1 year ago

There's quite a lot to do here:

Hellebore commented 1 year ago

Fixed.