Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Python: list structural implementers of typing.Protocol in the lego / implementors view

Open
#386 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
devtools

Research direction

Start by locating the Python handling for --for and the lego implementors view, then read how nominal implementors are identified and how Python classes and typing.Protocol methods are represented. Check the existing tests for those views before deciding where structural matches should appear. Done means qualifying classes that cover a Protocol’s public methods can be shown as structural implementors, distinguishable from nominal subclasses, with tests covering the behavior and its limits.

Written by the indexing model from the issue text.

Description

help wanted

In Python, a class usually satisfies a typing.Protocol structurally: it defines the protocol's methods without subclassing it. --for and the lego block list only nominal implementors.

On a medium Python codebase we measured, a provider Protocol shows 5 implementors in the lego view, all of them sub-protocols, while 17 concrete classes define every one of its methods. The same holds for most protocols in that tree: 35 of 38 Protocol/ABC bases have implementers, but only 5 have nominal ones.

Request: for Python, optionally include classes whose public methods cover a Protocol's public methods, marked as structural so they are distinguishable from nominal subclasses. A minimum-method threshold or a confidence mark would keep single-method protocols from matching too broadly.

Why it matters for agent context: "what already implements this interface?" is the question an agent asks before writing a new adapter, and today the answer for Protocols is empty.

Observed on ripwire 0.6.1; the 0.6.2 to 0.6.5 release notes do not mention structural Protocol implementers.

Dominant language
C++
Stars
2.5k
Forks
158
Avg merge
2d 50m
Merged PRs (30d)
55

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from redhat-et/ripwire

All issues in redhat-et/ripwire

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.