What is this extension inside Cursor? Is it the official replacement for the blocked Pylance extension? I found it by accident on the Cursor marketplace but I cannot seem to find any official references to it:
I cannot find it on the official VSCode marketplace, only in Cursor within the extension marketplace when I type “Cursor Pyright”. Does anyone have any information?
Based on what I saw on VSCode related forums, MS has yanked out several core extensions for several languages, various communities made their own, so apparently has Cursor.
Yeah I suppose, but what is the difference between this one and the one that is sometimes bundled within Cursor? (this is the other one, and seems to be more outdated)
Also, the docs never specify any of this, maybe they are preparing for a mature custom extension release?
No, I can’t find anything, I can only find it inside Cursor itself inside the extension bar when you search for Cursor Pyright or Pyright I think. The weird thing is also that the extension is just called “Python”. My colleague can also find it by searching.
It seems to be something custom that can not be found on the normal VSCode marketplace or such; only in Cursor itself?
There are separate marketplaces apart of the ms marketplace. If ms yanks the access to an extension on their marketplace other communnities have been adding them to their own marketplaces for a while.
Hi @ravirahman, a few questions about the extension:
Is this the preferred extension to use now for type checking for Python within Cursor?
What is the difference between this extension and the older cursor Pyright one that was bundled in my Cursor installation (but weirdly enough not on my colleagues pc). I initially removed that extension but couldn’t find it back, so I found the one linked in this bullet point.
I know Microsoft blocks the newer versions of Pylance on VSCode forks, but is the older version that is still accessible still fully functional or is it broken in some way?
Are these Cursor extensions published on their own marketplace? Since I cannot find these on the VSCode extension marketplace
I couldn’t find much information for these questions on the internet or the forum. Thanks in advance
Yes, this is the recommended extension for Python. We built this by forking BasedPyright and changing a few of the settings to more closely algin with the Pylance defaults. Under the hood, it uses the same Pyright type checker and open-source Python debugger.
As some users have reported issues with the older Pylance extension, we are offering this one instead as an officially supported alternative. Since all of the internals are the same, we intend that it can be a drop in replacement.
While we do run our own extension marketplace, it is accessible only within Cursor (there is no website for it). We do not publish our extensions on Open-VSX or the Microsoft VSCode Marketplace.
Hi @samibg, you can use the cursorpyright.analysis.diagnosticSeverityOverrides option to configure settings globally. Note that the options will only be applied for projects that don’t have a pyproject.toml or pyrightconfig.json file.
Awesome thanks! I also noticed that cursorpyright doesn’t highlight ‘self’ or ‘cls’ differently than the other parameters. After looking into it it seems that VSCode’s language server supports ‘selfParameter’ as a semantic token which allows it to highlight it differently, whereas Cursor’s does not. Unfortunately, disalbing semantic highlighting and using tokenColorCustomizations exclusively is quite time consuming to set up and not too precise.
Just hoping to put this on your radar - I don’t think there’s a way to have tokenColorCustomizations have selective precedence over certain token types. I know it’s a bit nitpicky but this preference comes from many years of muscle memory
Hi @samibg – I see, thanks for sharing this. Could you create an issue in the basedpyright github? We plan on rebasing in their updates into our extension on a regular cadence.
Hi @ravirahman, I think right now there’s maybe some issue with pyright for the latest version of cursor. Although it shows “install on remote server” and I click, it will download a while and fail. You can see more describe in bug report, I just create an issue there, but I want to know if there is any other way to install the pyright?
I think this extension may be related to python syntax checking, it bothers me a lot since my code is no red line before but it shows a lot even len(dataset)
Hi @Andrew_J, could you try uninstalling that plugin? This is the old, deprecated version of our Python extension that we no longer distribute, which is probably why it won’t install on the remote.
Instead, could you search for Python and try this one?
How do I prevent this extension from installing itself? As of a couple days ago, I’m getting basedpyright lint and type errors everywhere, which I’m not interested in. I keep uninstalling but every time I rebuild my dev containers, it’s back.
It’ll auto-install if it’s configured to do so as part of the extensions in the devcontainer configuration or workspace recommendation. You can set the cursorpyright.analysis.typeCheckingMode to off to hide all errors.
Otherwise is there a way to disable all of pyright’s messages/problems? Setting cursorpyright.analysis.typeCheckingMode to off removes the type errors which is most of them but there’s still lint errors that I don’t want since I use ruff. For example: