Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Python Inheritance HierarchyNew to Visual Studio Code? Get it now.
Python Inheritance Hierarchy

Python Inheritance Hierarchy

wsa-2002

| (0) | Free
Shows whether Python class methods are inherited and from which class
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Python Inheritance Hierarchy Extension

A VS Code extension that helps you analyze inheritance relationships of Python class methods, showing whether methods are inherited and from which class.

Features

  • Visual Indicators: Gutter icons (🔼/🔽) show inheritance relationships directly in the editor
    • 🔽 Down arrow: Method is inherited by subclasses
    • 🔼 Up arrow: Method is inherited from parent class
  • Rich Hover Information: Hover over method definitions or gutter icons to see detailed inheritance information
    • Shows parent class and file location for inherited methods
    • Lists all subclasses that inherit the method
    • Displays override status
  • Cross-File Analysis: Analyzes inheritance relationships across multiple files in your workspace
  • Third-Party Package Support: Can analyze classes from third-party packages in site-packages
  • Complete Analysis Report: Use the command palette to view a complete inheritance relationship analysis report
  • Multi-Level Inheritance: Tracks multi-level class inheritance relationships
  • Method Override Detection: Identifies whether methods override parent class methods
  • Ctrl+Click Navigation: Jump to parent class method definitions with Ctrl+Click

Usage

Visual Indicators

  1. Open any Python file (.py)
  2. Icons will automatically appear in the gutter next to method definitions:
    • 🔽 Blue down arrow: Method is inherited by subclasses
    • 🔼 Red up arrow: Method is inherited from parent class

Hover Information

  1. Hover over a method definition line or the gutter icon
  2. A detailed tooltip will show:
    • Whether the method is inherited from a parent class
    • Which parent class it's inherited from
    • File location and line number of the parent definition
    • Whether the method overrides a parent class method
    • List of subclasses that inherit this method

Navigation

  • Ctrl+Click (or Cmd+Click on macOS) on a method definition to jump to its parent class definition

Complete Analysis Report

  1. Open a Python file
  2. Press Cmd+Shift+P (macOS) or Ctrl+Shift+P (Windows/Linux) to open the command palette
  3. Type "Show Inheritance Analysis" or "Python Inheritance: Show Inheritance Analysis"
  4. A Markdown view will open in the side panel showing the complete class inheritance relationship analysis

Requirements

  • VS Code 1.60.0 or higher
  • Python files (.py extension)

Extension Settings

This extension requires no configuration and will automatically activate when you open Python files.

Publishing

This extension includes a GitHub Action workflow for automatic publishing to the VS Code Marketplace.

Setup

  1. Create a Personal Access Token (PAT):

    • Go to Azure DevOps
    • Sign in with the account associated with your VS Code Marketplace publisher
    • Go to User Settings → Personal Access Tokens
    • Create a new token with "Marketplace (Manage)" scope
    • Copy the token
  2. Add the token to GitHub Secrets:

    • Go to your GitHub repository
    • Navigate to Settings → Secrets and variables → Actions
    • Click "New repository secret"
    • Name: VSCE_PAT
    • Value: Paste your Personal Access Token
    • Click "Add secret"

Publishing Methods

Method 1: Create a Release

  1. Create a new release on GitHub (e.g., tag v0.0.2)
  2. The workflow will automatically:
    • Extract the version from the tag
    • Update package.json version
    • Build and publish to VS Code Marketplace

Method 2: Manual Workflow Dispatch

  1. Go to Actions tab in GitHub
  2. Select "Publish to VS Code Marketplace" workflow
  3. Click "Run workflow"
  4. Enter the version number (e.g., 0.0.2)
  5. Click "Run workflow"

The workflow will build, package, and publish your extension automatically.

Known Limitations

  • The parser uses regular expressions and may not handle all complex Python syntax
  • Dynamic inheritance (runtime-determined inheritance) is not supported
  • Some edge cases in complex inheritance hierarchies may not be detected

Changelog

0.0.1

  • Initial release
  • Basic class and method parsing
  • Visual gutter icons for inheritance relationships
  • Rich hover information with detailed inheritance details
  • Cross-file inheritance analysis
  • Third-party package support
  • Ctrl+Click navigation to parent methods
  • Complete inheritance analysis report

Following extension guidelines

Ensure that you've read through the extensions guidelines and follow the best practices for creating your extension.

  • Extension Guidelines

Working with Markdown

You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts:

  • Split the editor (Cmd+\ on macOS or Ctrl+\ on Windows and Linux).
  • Toggle preview (Shift+Cmd+V on macOS or Shift+Ctrl+V on Windows and Linux).
  • Press Ctrl+Space (Windows, Linux, macOS) to see a list of Markdown snippets.

For more information

  • Visual Studio Code's Markdown Support
  • Markdown Syntax Reference

Enjoy!

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