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

[1.12 regression] Django plugin missing required argument readonly_keys #17983

Closed
gmulz opened this issue Oct 17, 2024 · 1 comment
Closed

[1.12 regression] Django plugin missing required argument readonly_keys #17983

gmulz opened this issue Oct 17, 2024 · 1 comment
Labels
bug mypy got something wrong

Comments

@gmulz
Copy link

gmulz commented Oct 17, 2024

Bug Report
Upon upgrading from 1.11.2 to 1.12.0, we noticed our mypy runs breaking with an INTERNAL ERROR. The error ostensibly is on a line that starts a Django model query, similar to MyModel.objects.values("column_name").annotate(sum=Sum("other_column")).order_by("sort_column")

(A clear and concise description of what the bug is.)

To Reproduce

It's unclear why this is happening to the specific Django model/query and not others, therefore difficult to reproduce. This error does not arise on other Django queries structured similarly (though I don't know if it's just this line that's crashing mypy and it can't reach ones later on)

Expected Behavior

Mypy should have had no issues with the line in question, as had been the case on earlier versions.

Actual Behavior

The following error shows up in our github CI checks. It appears to be some problem with the Django plugin.

image

Your Environment

  • Mypy version used: 1.12.0
  • Mypy command-line flags: specific file names
  • Mypy configuration options from mypy.ini (and other config files): plugins = mypy_django_plugin.main, mypy_drf_plugin.main
  • Python version used: 3.10
@gmulz gmulz added the bug mypy got something wrong label Oct 17, 2024
@brianschubert
Copy link
Collaborator

brianschubert commented Oct 17, 2024

Duplicate of #17958. Good news, this had already been fixed in typeddjango/django-stubs#2408

@JelleZijlstra JelleZijlstra closed this as not planned Won't fix, can't repro, duplicate, stale Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug mypy got something wrong
Projects
None yet
Development

No branches or pull requests

3 participants