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

Fix broken tests caused by django-stubs 4.2.4 #465

Closed
wants to merge 3 commits into from

Conversation

brianhelba
Copy link
Contributor

No description provided.

@brianhelba
Copy link
Contributor Author

@sobolevn PTAL.

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.

This should also fix the issue

tests/typecheck/test_views.yml Outdated Show resolved Hide resolved
tests/typecheck/test_views.yml Outdated Show resolved Hide resolved
Co-authored-by: Nikita Sobolev <[email protected]>
@brianhelba
Copy link
Contributor Author

Ah, makes sense. Applied your suggestion.

@brianhelba
Copy link
Contributor Author

@sobolevn I thought I understood your suggestion: since MyModel had no fields, it was generic and had no .objects.

However, it looks like the tests are actually still failing with your suggestion.

@sobolevn
Copy link
Member

Thank you!

@brianhelba
Copy link
Contributor Author

No, the tests are still failing. I just pushed the import fix to isolate the actual breakage:

main:8: error: "Type[MyModel]" has no attribute "objects"

@brianhelba brianhelba requested a review from sobolevn September 12, 2023 22:06
@sobolevn
Copy link
Member

This looks like a bug

@christianbundy
Copy link
Contributor

is this typeddjango/django-stubs#1684?

@christianbundy
Copy link
Contributor

opened a PR with a fix here! #471

@intgr
Copy link
Contributor

intgr commented Oct 4, 2023

I have merged @christianbundy's fix in PR #471.

@intgr intgr closed this Oct 4, 2023
@brianhelba brianhelba deleted the fix-test branch October 5, 2023 16:06
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.

4 participants