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

Don't crash when inspecting classes loaded from cache #2185

Merged
merged 1 commit into from
May 26, 2024

Conversation

flaeppe
Copy link
Member

@flaeppe flaeppe commented May 26, 2024

ClassDefs are populated with faked TypeInfo when loaded from cache. A faked TypeInfo doesn't have all attributes of a TypeInfo set. So we'll avoid inspecting the faked TypeInfo

Related issues

Closes #2184

`ClassDef`s are populated with faked `TypeInfo` when loaded from cache.
A faked `TypeInfo` doesn't have all attributes of a `TypeInfo` set. So
we'll avoid inspecting the faked `TypeInfo`
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!

@sobolevn sobolevn merged commit b8f1592 into typeddjango:master May 26, 2024
36 checks passed
@flaeppe flaeppe deleted the fix/handle-typeinfo-from-cache branch May 26, 2024 08:36
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.

attribute 'bases' of 'TypeInfo' undefined when running mypy after adding a model
2 participants