Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds get_function_signature_hook #9102

Merged
merged 4 commits into from Oct 18, 2020
Merged

Adds get_function_signature_hook #9102

merged 4 commits into from Oct 18, 2020

Conversation

sobolevn
Copy link
Member

@sobolevn sobolevn commented Jul 6, 2020

This PR introduces get_function_signature_hook that behaves the similar way as get_method_signature_hook.

Closes #9101

@@ -675,6 +679,34 @@ def try_infer_partial_value_type_from_call(

return None

def apply_function_signature_hook(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would it be possible to merge this with apply_method_signature_hook? Maybe with a joint helper that takes formal args, callee, context, and the checker, and then pass different versions of that to the joint helper?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Actually I just did this myself

Copy link
Collaborator

@msullivan msullivan left a comment

Choose a reason for hiding this comment

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

This looks good, one request.

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.

New plugin hook: get_function_signature_hook
2 participants