Skip to content

Comments

fix: resolve __init__ introspection when Protocol is first in bases#658

Merged
Tishka17 merged 1 commit intoreagento:developfrom
fadedDexofan:fix/protocol-inspection
Feb 11, 2026
Merged

fix: resolve __init__ introspection when Protocol is first in bases#658
Tishka17 merged 1 commit intoreagento:developfrom
fadedDexofan:fix/protocol-inspection

Conversation

@fadedDexofan
Copy link
Contributor

Protocol's _no_init_or_replace_init stub shadows real __init__ from base classes. Walk MRO to find the actual __init__ with type hints.

Closes #628

@fadedDexofan fadedDexofan force-pushed the fix/protocol-inspection branch 2 times, most recently from 715e548 to ceb8cad Compare February 11, 2026 03:15
@github-actions
Copy link

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  src/dishka/provider
  make_factory.py
Project Total  

This report was generated by python-coverage-comment-action

Protocol's `_no_init_or_replace_init` stub shadows real `__init__` from
base classes. Walk MRO to find the actual `__init__` with type hints.

Closes reagento#628
@fadedDexofan fadedDexofan force-pushed the fix/protocol-inspection branch from ceb8cad to 51af83b Compare February 11, 2026 10:52
@sonarqubecloud
Copy link

@Tishka17 Tishka17 merged commit 24dc3e9 into reagento:develop Feb 11, 2026
8 checks passed
@fadedDexofan fadedDexofan deleted the fix/protocol-inspection branch February 11, 2026 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Protocol in the list of base classes breaks the introspection of __init__

2 participants