Model.__init__ supporting same typing as assigment (#835)

* `Model.__init__` supporting same typing as assigment

* Update mypy_django_plugin/django/context.py
This commit is contained in:
Petter Friberg
2022-01-29 10:07:26 +01:00
committed by GitHub
parent c556668d7a
commit 8aae836a26
9 changed files with 177 additions and 18 deletions

View File

@@ -29,7 +29,7 @@ def typecheck_queryset_filter(ctx: MethodContext, django_context: DjangoContext)
if lookup_kwarg is None:
continue
if isinstance(provided_type, Instance) and provided_type.type.has_base(
"django.db.models.expressions.Combinable"
fullnames.COMBINABLE_EXPRESSION_FULLNAME
):
provided_type = resolve_combinable_type(provided_type, django_context)