From d3d854dac83a2295662cb651c076f3d77116e07b Mon Sep 17 00:00:00 2001 From: James Pulec Date: Wed, 28 Oct 2020 20:27:46 -0700 Subject: [PATCH 1/3] Add resolve_callables to db.models.utils --- django-stubs/db/models/utils.pyi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/django-stubs/db/models/utils.pyi b/django-stubs/db/models/utils.pyi index a1af698..3997b9f 100644 --- a/django-stubs/db/models/utils.pyi +++ b/django-stubs/db/models/utils.pyi @@ -1,5 +1,7 @@ -from typing import Tuple, Type, Union +from typing import Any, Generator, MutableMapping, Tuple, Type, Union from django.db.models.base import Model def make_model_tuple(model: Union[Type[Model], str]) -> Tuple[str, str]: ... + +def resolve_callables(mapping: MutableMapping[str, Any]) -> Generator[Tuple[str, Any]]: ... From 9a9a0123c758fadee4079429754fa92c512b5aaa Mon Sep 17 00:00:00 2001 From: James Pulec Date: Wed, 28 Oct 2020 21:33:43 -0700 Subject: [PATCH 2/3] Fix Generator Type --- django-stubs/db/models/utils.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django-stubs/db/models/utils.pyi b/django-stubs/db/models/utils.pyi index 3997b9f..9f2fc53 100644 --- a/django-stubs/db/models/utils.pyi +++ b/django-stubs/db/models/utils.pyi @@ -4,4 +4,4 @@ from django.db.models.base import Model def make_model_tuple(model: Union[Type[Model], str]) -> Tuple[str, str]: ... -def resolve_callables(mapping: MutableMapping[str, Any]) -> Generator[Tuple[str, Any]]: ... +def resolve_callables(mapping: MutableMapping[str, Any]) -> Generator[Tuple[str, Any], None, None]: ... From 153613eddb5f5713e74e8621783988670d704f83 Mon Sep 17 00:00:00 2001 From: Maksim Kurnikov Date: Wed, 20 Jan 2021 02:11:37 +0300 Subject: [PATCH 3/3] run black --- django-stubs/db/models/utils.pyi | 1 - 1 file changed, 1 deletion(-) diff --git a/django-stubs/db/models/utils.pyi b/django-stubs/db/models/utils.pyi index 9f2fc53..69089d1 100644 --- a/django-stubs/db/models/utils.pyi +++ b/django-stubs/db/models/utils.pyi @@ -3,5 +3,4 @@ from typing import Any, Generator, MutableMapping, Tuple, Type, Union from django.db.models.base import Model def make_model_tuple(model: Union[Type[Model], str]) -> Tuple[str, str]: ... - def resolve_callables(mapping: MutableMapping[str, Any]) -> Generator[Tuple[str, Any], None, None]: ...