Skip to content

Hovering over instance of derived class shows docstring for base class #7970

Description

@johndoknjas

Environment data

  • Pylance version: 2025.6.2
  • OS and version: Mac 14.7.5
  • Python version (& distribution if applicable, e.g. Anaconda): 3.13

Code Snippet

def test():
    raise NotImplementedError()

Repro Steps

  1. Hover over the NotImplementedError in the code snippet within vscode.

Expected behavior

Docstring for NotImplementedError would appear in the popup.

Actual behavior

Docstring for base class BaseException appears:

Image

Logs

XXX

Metadata

Metadata

Assignees

Labels

ai-triage-respondedIndicate whether the AI triage agent has responded to this issue.enhancementNew feature or requestrepro workspaceIssue has a retained repro workspace

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions