From 7d0c2759aac1dcd60948b3af65292778fb100fd8 Mon Sep 17 00:00:00 2001 From: Marcello Dalponte Date: Thu, 9 Jan 2025 18:42:17 +0100 Subject: [PATCH] Fix Signal._live_receivers typing `_live_receivers` returns a tuple of two lists of callables since [support for async](https://github.com/django/django/commit/e83a88566a71a2353cebc35992c110be0f8628af#diff-65f7ef82645dcdb6a7898f2126781336c222437f65d3666c9d65b89edf725a6bR456) has been added. --- django-stubs/dispatch/dispatcher.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django-stubs/dispatch/dispatcher.pyi b/django-stubs/dispatch/dispatcher.pyi index 2682d9cb7..bd1e24a38 100644 --- a/django-stubs/dispatch/dispatcher.pyi +++ b/django-stubs/dispatch/dispatcher.pyi @@ -26,7 +26,7 @@ class Signal: async def asend(self, sender: Any, **named: Any) -> list[tuple[Callable, str | None]]: ... def send_robust(self, sender: Any, **named: Any) -> list[tuple[Callable, Exception | Any]]: ... async def asend_robust(self, sender: Any, **named: Any) -> list[tuple[Callable, Exception | Any]]: ... - def _live_receivers(self, sender: Any) -> list[Callable]: ... + def _live_receivers(self, sender: Any) -> tuple[list[Callable], list[Callable]]: ... _F = TypeVar("_F", bound=Callable[..., Any])