Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Python Override MarkNew to Visual Studio Code? Get it now.
Python Override Mark

Python Override Mark

maxorr

|
321 installs
| (3) | Free
Visual and interactive indicators for overridden methods in Python.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Python Override Mark

Version Installs Downloads Build Status

Inline CodeLens indicators for overridden and implemented methods in Python.

Technical Overview

TypeScript VS Code API

High-Level Overview

  • Cross-File Support: Works across your workspace.
  • Implementation Detection: Identifies methods that are implemented/overridden by parent/subclasses.
  • Optional Gutter Markers: Shows gutter icons for overrides and subclass implementations.
  • Hover Navigation: Shows hover details with navigation links for overrides and subclass implementations.
  • CodeLens Navigation:
    • Overrides: Click the "Overrides Parent.method" CodeLens to navigate to the parent definition.
    • Implementations: Click "Implemented in Child.method" to navigate to the subclass implementation.
    • Multiple Implementations: If multiple subclasses implement a method, a dropdown allows you to choose which one to navigate to.
  • Deep Inheritance Support: Detects overrides across multiple levels of inheritance Bread -> Sandwich -> Burger

Examples

Inheritance CodeLens (Default)

Inheritance CodeLens

Hover Navigation

Hover Navigation

Gutter Navigation

Gutter Navigation

Inlay Hint Navigation

Inlay Hint Navigation

Performance Settings

Performance Settings

Requirements

  • The Python extension for VS Code (ms-python.python) must be installed and active.

Extension Settings

Setting Description
pythonOverrideMark.display.codeLens Enable CodeLens indicators and navigation for overrides and methods implemented in subclasses. Default is true
pythonOverrideMark.display.gutterIcons Enable gutter icons for overrides and methods implemented in subclasses. Default is false
pythonOverrideMark.display.hover Enable hover details and navigation links for overrides and methods implemented in subclasses. Default is true
pythonOverrideMark.display.inlayHints Enable inline Inlay Hints for overrides and methods implemented in subclasses. Default is false
pythonOverrideMark.performance.debounceDelay Delay in milliseconds before updating marks after typing. Default is 500
pythonOverrideMark.performance.maxInheritanceDepth Maximum depth to search for parent classes. Default is 3. Set to 0 for unlimited

How it Works

This extension uses the VS Code Python extension's Language Server Protocol (LSP) features to analyze your code:

  1. Override Detection: It scans the active document for class definitions and resolves their parent classes (even across files). It then compares methods to identify overrides.
  2. Implementation Detection: It finds references to the current class to identify subclasses. It then checks those subclasses for methods that implement or override methods in the parent.
  3. Gutter Markers: Gutter icons are visual indicators. Direct gutter icon clicks are not supported by the VS Code API.
  4. Hover Navigation: Hover details can include navigation links that use the same commands as CodeLens navigation.
  5. Performance: Detection is debounced (default 500ms) and optimized to skip non-class symbols to ensure a smooth editing experience.

Future Improvements

  • Toggle Settings: Add a setting to toggle "Parent -> Child" and "Child -> Parent" lens independently.
  • Localization: Support multiple languages for CodeLens text.

Contributing

Contributions are welcome!

Feel free to open an issue for bugs or feature requests, or submit a pull request.

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