From def914a34cfd6c14bae5a149fedf5c2908d9adae Mon Sep 17 00:00:00 2001 From: q0w <43147888+q0w@users.noreply.github.com> Date: Sat, 24 Feb 2024 14:25:23 +0300 Subject: [PATCH] Add Signal.asend and Signal.asend_robust --- django-stubs/dispatch/dispatcher.pyi | 2 ++ scripts/stubtest/allowlist_todo_django50.txt | 4 ---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/django-stubs/dispatch/dispatcher.pyi b/django-stubs/dispatch/dispatcher.pyi index e56a3a940..02b6a0a70 100644 --- a/django-stubs/dispatch/dispatcher.pyi +++ b/django-stubs/dispatch/dispatcher.pyi @@ -23,7 +23,9 @@ class Signal: ) -> bool: ... def has_listeners(self, sender: Any = ...) -> bool: ... def send(self, sender: Any, **named: Any) -> list[tuple[Callable, str | None]]: ... + 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]: ... _F = TypeVar("_F", bound=Callable[..., Any]) diff --git a/scripts/stubtest/allowlist_todo_django50.txt b/scripts/stubtest/allowlist_todo_django50.txt index 3d71345a8..6a65d45bb 100644 --- a/scripts/stubtest/allowlist_todo_django50.txt +++ b/scripts/stubtest/allowlist_todo_django50.txt @@ -238,10 +238,6 @@ django.db.models.sql.query.Query.build_filtered_relation_q django.db.models.sql.query.Query.join django.db.models.sql.query.Query.resolve_lookup_value django.db.models.sql.query.Query.setup_joins -django.dispatch.Signal.asend -django.dispatch.Signal.asend_robust -django.dispatch.dispatcher.Signal.asend -django.dispatch.dispatcher.Signal.asend_robust django.forms.BaseForm._html_output django.forms.BaseModelFormSet.save_existing django.forms.BoundField.get_context