Skip to content

fix: do not treat overridden methods as inherited when mixing a generic base with a plain base#887

Open
SAY-5 wants to merge 2 commits into
mitmproxy:mainfrom
SAY-5:fix-generic-base-inherited-override
Open

fix: do not treat overridden methods as inherited when mixing a generic base with a plain base#887
SAY-5 wants to merge 2 commits into
mitmproxy:mainfrom
SAY-5:fix-generic-base-inherited-override

Conversation

@SAY-5
Copy link
Copy Markdown

@SAY-5 SAY-5 commented May 12, 2026

When a class inherits from both a Generic[...] base and a plain base class, Class._bases prepended the plain base from __orig_bases__ ahead of the class itself in __mro__, causing overridden methods to be reported as inherited (and their docstrings dropped). The fix only prepends __orig_bases__ entries that are absent from __mro__, which still covers the TypedDict case. Closes #862.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pdoc treats overridden methods as inherited when mixing Generic[...] base class with non-generic ABC in multiple inheritance

1 participant