When I use a match-case statement in Python in VS Code, it gives red squiggly lines and errors in the "problems" tab:
Asked
Active
Viewed 1.2k times
18
-
What version of Jedi are you using? – Alexander Oct 17 '21 at 03:10
-
how do I check? – Tuor Oct 17 '21 at 03:12
-
Idk, I just figure it's a version that doesn't yet recognize this syntax. From the answer, looks like support isn't implement yet – Alexander Oct 17 '21 at 03:30
-
yeah, I switched to pylance and it works great – Tuor Oct 17 '21 at 03:32
1 Answers
22
I got a response from one of the vscode-python devs on GitHub:
Unfortunately Jedi (and it's underlying parser, parso) has not added support for the match statement yet. Please consider switching your language server to "Default"/"Pylance" as our Pylance language server already has support.
As soon as Jedi makes a new release with match statement support we will take the update, but otherwise this is out of our hands. Since we have a language server that has support I'm a closing this issue.

Tuor
- 875
- 1
- 8
- 32
-
1Nowadays I use pylance, not jedi, but [it](https://github.com/davidhalter/jedi/issues/1883) seems like Jedi still dosn't support `match` – Tuor Oct 21 '22 at 15:21