@ravirahman Hi dear ravirahman, I have probed this new Cursor-Pyright. I just would like to report some highlighting discrepancies between Cursor’s and MS’ Pyright now.
Apart from all other issues I haven’t had time to probe with, I can observe that highlighting regarding decorators and the property methods are a bit different. In MS’ version, the decorators uses the colour the same as classes, but here in Cursor’s, function highlighting is being used. Also for property methods, MS’ Pyright uses the colour the same as all variables, but here in Cursor’s, normal functions’ highlighting is being used.
@fingertap – you can set the setting cursorpyright.analysis.typeCheckingMode to ‘off’ to disable most syntax errors, and cursorpyright.disableLanguageServices to fully disable the language server.
@borjigin-mergen – our extension is based on basedpyright. Could you raise an issue in their GitHub?
we need to have ms-python.python for python, regardless of using vscode or cursor ide.
ms-pyright.pyright is only for Vscode, not Cursor, we need to use anysphere.pyright instead.
ms-python.vscode-pylance uses ms-pyright.pyright under the hood, and provides more functionalities.
eg: python.analysis.completeFunctionParens (which now Cursor doesnt provide?..)
anysphere.cursorpyright is a newer version of anysphere.pyright, and it conflicts with ms-python.vscode-pylance.
note:
language server, linters, formatter, are a mess (too many) in python.
one tool can partially provide functionalities of one/two/three of those three.
and you need to mix and mangle them together to get the complete picture.
eg: charliermarsh.ruff provides some linting + code formatting.
Workaround: keep [tool.pyright] while disabling Cursor’s basedpyright
Goal: Use Pyright configuration from pyproject.toml ([tool.pyright]) and suppress diagnostics from Cursor’s Python extension (basedpyright), without losing language services.
After doing this, basedpyright stops emitting its lint/type-check diagnostics in Cursor while Pyright continues to respect [tool.pyright].
You will see a noisy message that can be ignored:
Pyproject file parse attempt 1 Error: Pyproject file cannot have both `pyright` and `basedpyright` sections. pick one
Sources: Python
In practice, this is preferable to the persistent basedpyright lint spam.
What did not work
The following settings had no practical effect because [tool.pyright] takes precedence:
Where can I find a download link to this extension on open-vsx.org? There the older one is listed which has identifier anysphere.pyright version 1.37.x instead of anysphere.cursorpyrightversion 1.10.x
I cant seem to find any git repo as well. Why cursor doesnt want us to see code of this extension?