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

Call dynamic class hook on generic classes #16052

Merged
merged 1 commit into from Sep 19, 2023

Conversation

flaeppe
Copy link
Contributor

@flaeppe flaeppe commented Sep 5, 2023

Fixes: #8359

CC @sobolevn

get_dynamic_class_hook() will now additionally be called for generic classes with parameters. e.g.

y = SomeGenericClass[type, ...].method()

Copy link
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks!

Let's wait for one more review, because we are clearly very opinioned about this feature :)

@flaeppe
Copy link
Contributor Author

flaeppe commented Sep 5, 2023

Let's wait for one more review, because we are clearly very opinioned about this feature :)

Yes indeed, we're quite biased here

@github-actions
Copy link
Contributor

github-actions bot commented Sep 5, 2023

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

@sobolevn sobolevn merged commit ba978f4 into python:master Sep 19, 2023
18 checks passed
@sobolevn
Copy link
Member

Congrats @flaeppe on your first mypy contribution :)
It would be awesome if you continue!

@flaeppe flaeppe deleted the fix/issue-8359 branch September 19, 2023 08:03
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.

get_dynamic_class_hook() not invoked on generic types
3 participants