Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Python Inheritance NavigatorNew to Visual Studio Code? Get it now.
Python Inheritance Navigator

Python Inheritance Navigator

Yonatan Nethanel

|
19 installs
| (0) | Free
Navigate Python method inheritance with Go to Base Method and Go to Overrides commands
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Python Inheritance Navigator

A VS Code extension that helps developers navigate Python method inheritance by providing "Go to Base Method" and "Go to Overrides" commands via CodeLens.

sample

Features

  • Go to Base Method: Navigate to the base method definition when a method overrides a parent class method
  • Go to Overrides: See all subclasses that override a method and navigate to them
  • CodeLens Integration: Visual links above method definitions showing inheritance relationships
  • Background Indexing: Eager background indexing of workspace Python files
  • Real-time Updates: Automatically updates when files change

Requirements

  • Python 3.6+ (for creating the extension's virtual environment)
  • VS Code 1.74.0 or higher
  • Dependencies (python-mro-language-server, jedi, parso) are automatically installed into an extension-managed virtual environment

Installation

  1. Install the extension from the VS Code marketplace (when published)
  2. Or clone this repository and build:
    npm install
    npm run compile
    

Usage

  1. Open a Python workspace in VS Code
  2. The extension will automatically index all Python files in the background
  3. CodeLens links will appear above methods that have base/override relationships:
    • "Go to Base: ClassName.method" - appears above methods that override a base class method
    • "Go to Overrides (N)" - appears above methods that are overridden by N subclasses
  4. Click on the CodeLens links to navigate to the base method or select from override locations

Configuration

The extension provides the following settings:

  • pythonInheritance.enableCodeLens: Enable/disable CodeLens links (default: true)
  • pythonInheritance.showBaseMethods: Show "Go to Base" links (default: true)
  • pythonInheritance.showOverrides: Show "Go to Overrides" links (default: true)
  • pythonInheritance.indexingScope: Scope of files to index - workspace or openFiles (default: workspace)

Supported Patterns

  • Abstract base classes with @abc.abstractmethod decorators
  • Method overriding in inheritance hierarchies
  • Multiple inheritance (MRO-based)
  • Async methods (async def)
  • Static methods, class methods, and properties

Troubleshooting

Logging

The extension logs all operations to a file for debugging:

  • Log location: .vscode/python-inheritance-navigator.log in your workspace root
  • The log file is automatically deleted and recreated on each extension activation
  • Logs include: initialization, Python process spawning, indexing progress, and errors

If you encounter issues:

  1. Check the log file for detailed error messages
  2. Look for Python path issues (the log shows which Python executable is being used)
  3. The extension manages its own Python virtual environment - no manual installation needed

Common Issues

"Failed to initialize Python Inheritance Navigator: Could not find Python 3.6+ executable"

  • The extension needs Python 3.6+ to create its virtual environment
  • Ensure python3 (or python on Windows) is available in your system PATH
  • The extension will automatically install required dependencies into its own isolated environment

"Python analyzer exited with code X"

  • Check the log file for the full error message from the Python analyzer
  • The extension uses its own managed virtual environment - dependencies are installed automatically on first use
  • If issues persist, try reloading VS Code to reinitialize the extension environment

Limitations

  • Dynamic inheritance (runtime class modifications) is not detected
  • Third-party libraries without source code may have limited analysis
  • Method signature matching is name-based, not full signature validation
  • Large codebases may take time to index initially

Development

Building

npm install
npm run compile

Manual Testing (Keep VS Code Open)

To test the extension manually with Python files:

Option 1: Using VS Code Debugger (Recommended)

  1. Open this project in VS Code
  2. Press F5 or go to Run > Start Debugging
  3. A new VS Code window will open with the extension loaded
  4. Open Python files in that window to test the extension
  5. The window stays open until you close it

Option 2: Using npm script

npm run dev

Option 3: Using shell script

./scripts/launch-dev.sh

Automated Testing

npm test

License

MIT License - see LICENSE file for details

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft