Cursor Pyright "Python" extension information

Inside the settings block, you can add this setting – e.g.

"customizations": {
  "vscode": {
    "settings": {
        "[python]": {
          "editor.formatOnSave": true,
          "editor.codeActionsOnSave": {
            "source.fixAll": "explicit",
            "source.organizeImports":"explicit"
          },
          "editor.defaultFormatter": "charliermarsh.ruff"
        },
        "python.defaultInterpreterPath": "/usr/local/bin/python3",
        "cursorpyright.analysis.typeCheckingMode": "off"
      },
    }
  }
}

Setting “cursorpyright.analysis.typeCheckingMode” to “off” is the key of this problem.

How to disable this? The cursor-pyright raises so many issues. If I cannot disable it, I will choose to refund and use another tool than cursor.

@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.

For your convenience, this is the legacy performance of MS’ Pylance.

Also, I wonder if there are any plans of releasing Cursor’s Pyright into GitHub so that raising issues would be easier?

@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?

Sure, the issue has been raised there. If you need, this is the link:

My understanding:

  • all we need now in cursor is: ms-python.python & anysphere.cursorpyright

  • 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.

    • see: FAQ | Ruff

    • comparing to:

      • js, has eslint, prettier, etc, but generally not as scattered as python
      • python with pyright, mypy, ..., black, isort, ....
      • java, more unified.

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.

Solution

Add this to pyproject.toml:

[tool.pyright]
# ... your pyright config ...

[tool.basedpyright]
enabled = false

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:

"cursorpyright.disableLanguageServices": true,
"cursorpyright.analysis.ignore": ["*"],
"cursorpyright.analysis.typeCheckingMode": "off"

Unclear whether a pyrightconfig.json can fully resolve this while retaining Cursor language features.

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?