Skip to content

Conversation

flaeppe
Copy link
Member

@flaeppe flaeppe commented Aug 6, 2024

The called hook expects/wants the class body analyzed, but the get_customize_class_mro_hook hook, that it was previously called from, invokes the hook before the class body has been analyzed..

Docs: https://mypy.readthedocs.io/en/stable/extending_mypy.html#current-list-of-plugin-hooks

get_customize_class_mro_hook() can be used to modify class MRO (for example insert some entries there) before the class body is analyzed.

Related issues

The called hook expects/wants the class body analyzed, but the
`get_customize_class_mro_hook` hook, that it was previously called from,
invokes the hook before the class body has been analyzed..
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.

Thanks! I think that we didn't have this hook back in the days of the original code.

@sobolevn sobolevn merged commit ac2b526 into typeddjango:master Aug 6, 2024
@flaeppe flaeppe deleted the fix/2304 branch August 6, 2024 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

[5.0.3 regression] error: "type[RealmFilter]" has no attribute "objects" [attr-defined]
2 participants