Open flaeppe opened 1 week ago
To clarify a little bit more; previously the plugin could tell mypy to defer on e.g. a case like this:
def not_a_manager() -> Any: ...
class SomeModel(models.Model):
objects = not_a_manager()
Deferring isn't gonna make it a more of a manager. The changed code looks for a more narrow/specific case that we want and can handle that comes from from_queryset
. For any other situation we now just continue without deferring.
@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)
Change so that we don't trigger unnecessary defer rounds during manager creation via the
from_queryset
method call.Refs:
1044
1023