-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Fix get_dynamic_class_hook does not work in some scenarios #10904
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
Fix get_dynamic_class_hook does not work in some scenarios #10904
Conversation
https://app.travis-ci.com/github/python/mypy/jobs/528284498 CI job "run test suite with python nightly" failed and produced a lot of error outputs like below
and more |
The python nightly CI has been broken for a while (which is why it's marked as allowed to fail). The mypyc errors seem to be related to mypyc/mypyc#864. Moving the class definition for |
The latest commit resolves this kind of errors. @pranavrajpal And thanks to you. |
Friendly ping, can I get a review? : ) |
Gently ping @pranavrajpal. Can I get a review? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for taking so long to review this.
This mostly looks good to me (see my one comment), but you'll probably have to wait for a review from a maintainer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, and sorry for the slow response! Looks good.
Description
The
get_dynamic_class_hook
method of the plugin never called if the statement is a chained assignment likeBad1 = Bad2 = declarative_base()
; Or if the statement is a chain of call expressions likeBase = declarative_base().with_optionalA()
.Test Plan