Weird caching issue with annotated querysets
bug
# Bug report
## What's wrong
Hello, I'm unsure how to replicate this, but I'm going through the many hundreds of new errors after upgrading to 6.0.3 (I'm loving all the new insight latest that django-stubs has into queryset methods btw) and I keep coming across situations where it appears that django-stubs is getting confused and thinking that inputs to functions that are normal querysets of a model without any annotations has items in it that are annotated.
It feels like some kind of caching issue perhaps?
Is this a known problem?
## System information
- OS:
- `python` version: 3.13
- `django` version: 6.0.4
- `mypy` version: 1.20.1
- `django-stubs` version: 6.0.3
- `django-stubs-ext` version: 6.0.3
关闭于 2026-05-03 9 条评论