Python docstring tooltips no longer format properly

Describe the Bug

Google-style python docstrings no longer format the way that they used to.

I used to be able to format function/method docstrings such as:

def myfunc(param1: str, param2: int):
  """
  General description.
  
  Args:
    param1 (str): Param 1 description on the same line
    param2 (int):
      Param 2 description is very long, so it takes up multiple lines,
      and starts (indented) one line below the param name and type.
  """

When hovering over myfunc, the tooltip used to show “Args” as a header and “str” and “int” in italics. Hovering over param1 or param2, it would show their individual description, in full.

Now, the formatting is gone, and param2 would no longer work. I know I could get param2 to work by adding backslashes to the end of each line, but my codebase is quite large and this would be a huge hassle – and it worked before.

Steps to Reproduce

Write the following in your editor:

def myfunc(param1: str, param2: int):
  """
  General description.
  
  Args:
    param1 (str): Param 1 description on the same line
    param2 (int):
      Param 2 description is very long, so it takes up multiple lines,
      and starts (indented) one line below the param name and type.
  """

Hover over myfunc, param1, and param2, and see that the formatting is missing.

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Version: 1.1.5 (Universal)
VSCode Version: 1.96.2
Commit: ef5eeb47a684b4c217dfaf0463aa7ea952f8ab90
Date: 2025-06-21T05:26:18.966Z (1 wk ago)

Additional Information

I believe there was a recent update (last few weeks) that made Cursor use the anysphere Python extension based on basedpyright instead of Pylance, which is based on pyright.

Does this stop you from using Cursor

No - Cursor works, but with this issue

Yes – this is an issue in basedpyright: Transform RestructuredText docstrings to nice tooltips · Issue #1343 · DetachHead/basedpyright · GitHub

Please upvote / start this issue, and we’ll incorporate the fix.

Can I just use Microsoft’s Pylance, which uses pyright? When I try to install the Pylance extension, Cursor automatically modifies my settings.json to disable Pylance, without any indication or granted permission. Can I turn that off? Is the AI agent dependent on basedpyright and not functional with Microsoft’s Pylance?

I really don’t appreciate that it makes changes to my codebase without indicating it to me or asking me to give permission to do so.

Unfortunately Pylance is not supported in Cursor, which is why we released the Cursor Python extension.

You can remove the modification from settings.json; we also persist the setting to the user settings. (We write to all levels of the settings to ensure that it takes effect). There is a notification on the first launch when it makes this change.

The AI features are not dependent on this extension; however, they do perform better when given feedback from the language server.