From e680326c72f1a255db2f40e82645ee397347ef4b Mon Sep 17 00:00:00 2001 From: Akseli Nelander Date: Wed, 1 Jul 2020 14:35:35 +0200 Subject: [PATCH] Fix partition signature (#413) --- django-stubs/utils/functional.pyi | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/django-stubs/utils/functional.pyi b/django-stubs/utils/functional.pyi index 40e415a..7fa7aba 100644 --- a/django-stubs/utils/functional.pyi +++ b/django-stubs/utils/functional.pyi @@ -56,4 +56,8 @@ class SimpleLazyObject(LazyObject): def __copy__(self) -> List[int]: ... def __deepcopy__(self, memo: Dict[Any, Any]) -> List[int]: ... -def partition(predicate: Callable, values: List[Model]) -> Tuple[List[Model], List[Model]]: ... +_PartitionMember = TypeVar("_PartitionMember") + +def partition( + predicate: Callable, values: List[_PartitionMember] +) -> Tuple[List[_PartitionMember], List[_PartitionMember]]: ...