Skip to content

docs: clarify get_method_signature_hook fullname uses call-site class#21650

Open
itxsamad1 wants to merge 1 commit into
python:masterfrom
itxsamad1:fix/plugin-hook-docstring
Open

docs: clarify get_method_signature_hook fullname uses call-site class#21650
itxsamad1 wants to merge 1 commit into
python:masterfrom
itxsamad1:fix/plugin-hook-docstring

Conversation

@itxsamad1

Copy link
Copy Markdown

Summary

  • Fix misleading docstring in Plugin.get_method_signature_hook and Plugin.get_method_hook
  • The hooks are invoked with the class of the object receiving the call (e.g. Derived.method), not the class where the method was defined (Base.method)

Fixes #19181

Test plan

  • Docstring-only change; verified example matches observed hook invocation behavior

@github-actions

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

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.

Wording in mypy.plugin.Plugin.get_method[_signature]_hook docstring

1 participant