forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Open
Labels
feature-requestRequest for new features or functionalityRequest for new features or functionalityneeds community feedbackAwaiting community feedbackAwaiting community feedback
Description
Problem
When opening a Python file in VS Code with the Python extension, the Outline view only shows class members that are explicitly implemented in that file/module.
If a class subclasses from other classes (even if those base classes are defined in the same file), no inherited attributes or methods are displayed. This makes it hard to understand the full API surface of a class at a glance.
Steps to Reproduce
- Define a base class with several methods.
- Define a subclass in the same file that inherits from the base class but overrides only one method.
- Open the file in VS Code and inspect the Outline view.
- Only the overridden method appears under the subclass; inherited methods are missing.
Expected Behavior
- The Outline view should list all attributes/methods visible on the class, not just those defined locally.
- Explicitly overridden attributes should be visually highlighted (e.g., bold or different color).
- Purely inherited attributes should still appear but visually de-emphasized (e.g., grayed out).
Why This Matters
- Helps developers quickly understand a class’s complete interface, especially in multiple-inheritance/ABC scenarios.
- Makes it easier to identify what’s been overridden and what’s inherited without manually jumping to base classes.
- Improves readability for large codebases with mixins or framework base classes.
Related Work
-
Third-party packages such as
richcan also display class APIs with inherited/overridden distinctions.

-
This seems related to VS Code’s
DocumentSymbolProviderfor Python, but I could not find any handling of inheritance in the current extension source.
Request
- Is it feasible to extend the Python extension’s Outline provider to support inherited attributes?
- Could you consider a design where overridden attributes are highlighted, and inherited attributes are listed but de-emphasized?
Environment
- VS Code version:
Version: 1.103.2
Commit: 6f17636121051a53c88d3e605c491d22af2ba755
Date: 2025-08-20T16:45:34.255Z
Electron: 37.2.3
ElectronBuildId: 12035395
Chromium: 138.0.7204.100
Node.js: 22.17.0
V8: 13.8.500258-electron.0
OS: Darwin arm64 24.6.0
- Python extension version: 2025.12.0
- OS: macOS 15.6.1 (24G90)
xwang056, yichenfu, singularitti, Moelf, chazeon and 2 more
Metadata
Metadata
Assignees
Labels
feature-requestRequest for new features or functionalityRequest for new features or functionalityneeds community feedbackAwaiting community feedbackAwaiting community feedback
