KEMBAR78
Support classes and type aliases in plugin hooks by ilevkivskyi · Pull Request #5379 · python/mypy · GitHub
Skip to content

Conversation

@ilevkivskyi
Copy link
Member

A step towards #4964

This only solves a small part of the problem that currently blocks progress in several plugins.

This PR adds basic support for class instantiation (including via aliases) in plugins. The proposed simple convention is that get_function_hook is called with the class qualified name.

We might also consider falling back to get_method_hook with __init__ qualified name, if the above returns None, and then to __new__.

cc: @dgelessus

@ilevkivskyi ilevkivskyi requested a review from gvanrossum July 20, 2018 21:32
Copy link
Member

@gvanrossum gvanrossum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG! And thanks for putting a complete example of a plugin in there.

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.

2 participants