Petter Friberg
Petter Friberg
To clarify a little bit more; previously the plugin _could_ tell mypy to defer on e.g. a case like this: ```python def not_a_manager() -> Any: ... class SomeModel(models.Model): objects =...
@sobolevn, @intgr would any of you guys mind checking this out? I'm suspecting it _could_ improve a couple of errors in #1023 (though I have no proof that it will)
If I read what you wrote correctly, here are some relevant references: Some time ago I attempted to introduce support for inheriting `.from_queryset` generated managers via the plugin, but got...
Ah, nice find! Just also want to mention that the plugin doesn't always behave when it comes to generic QuerySets. Not sure if it's affecting anything here though
I've tried to have a look but I have to say that I don't know. I was about to suggest to have a look at - #2127 and - #2142...
Yes I agree, we should make it public. Having `_UserModel` public should be very helpful for 3rd party code. We've previously mentioned this in: https://github.com/typeddjango/djangorestframework-stubs/issues/650#issuecomment-2285413166 and https://github.com/typeddjango/djangorestframework-stubs/pull/651#pullrequestreview-2234954083
Another example triggering this is [exhaustiveness checking](https://mypy.readthedocs.io/en/stable/literal_types.html#id3). Consider the following program ```python import enum from typing import NoReturn class MyEnum(str, enum.Enum): A = "A" B = "B" C = "C"...
I would revisit this comment first: https://github.com/typeddjango/django-stubs/pull/2174#issuecomment-2124394572 And the linked issues/PRs there. As iterables from get_queryset has been discussed previously
I don't have any good suggestions. Think I'd try to stick to what is returned runtime, if possible. But if Django mixes it probably becomes tedious quite fast, perhaps not...
Yes, of course. That's not a dirty approach though and then what about the left hand side? What if it wraps some sort of "EqualCounter"? So it counts items using...