Python Type Checker Setup (Python Extension / Basepyright)

Hello,

I am trying to configure a type checker for Python in my settings.json. I have tried for a few hours now, read some other forum posts but couldn’t find any solution to my problem.

When I start up Cursor I get this warning “Cursor Pyright changed the setting `python.languageServer` to ‘None’ to prevent conflicts with Jedi and Pylance.”. I am not sure why it is doing that. From my understanding Pylance is not supported anymore so setting the languageServer to Default should use Jedi.

In my settings.json I am using:

    "python.languageServer": "Default",
    "cursorpyright.analysis.typeCheckingMode": "basic",
    "cursorpyright.analysis.diagnosticMode": "workspace",
    "cursorpyright.analysis.autoSearchPaths": true,

But it doesn’t work. It is not scanning the full workspace, only opened files. If I restart Cursor, I get the warning I mentioned. Then it automatically sets the languageServer back to None and the type checker doesn’t work. If I manually set it to Default it is somewhat working but completely ignoring any settings like “python.analysis.diagnosticSeverityOverrides”. Which leads me to the conclusion that my configuration is wrong.

Is there anyone who has had a similar problem before? I am really having a hard time trying to find a good solution and the only option seems like going back to VSCode and using Pylance (which I wouldn’t prefer).

Go back to vscode and drop your Cursor subscription, that’s what I’m doing. Always breaking something.

https://forum.cursor.com/search?q=Pylance%20order%3Alatest