KEMBAR78
Add get_expression_type to CheckerPluginInterface by ikonst · Pull Request #15369 · python/mypy · GitHub
Skip to content

Conversation

ikonst
Copy link
Contributor

@ikonst ikonst commented Jun 5, 2023

Fixes #14845.

p.s. In the issue above, I was concerned that adding this method would create an avenue for infinite recursions (if called carelessly), but in fact I haven't managed to induce it, e.g. FunctionSigContext has args but not the call expression itself.

@github-actions
Copy link
Contributor

github-actions bot commented Jun 5, 2023

Diff from mypy_primer, showing the effect of this PR on open source code:

vision (https://github.com/pytorch/vision) got 1.22x slower (29.5s -> 35.9s)

@ikonst
Copy link
Contributor Author

ikonst commented Jun 5, 2023

@ilevkivskyi wdyt?

@ilevkivskyi
Copy link
Member

Yeah, I think it is a good solution.

@ikonst
Copy link
Contributor Author

ikonst commented Jun 9, 2023

Shall we merge?

@ilevkivskyi ilevkivskyi merged commit a108c67 into python:master Jun 11, 2023
@ilevkivskyi
Copy link
Member

@ikonst Please leave a comment about this in #6617 (mention it is a backwards compatible change).

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.

Let function signature hook have context of caller

2 participants