From 72e4deb490910e8019aad299490557d83d58bb24 Mon Sep 17 00:00:00 2001 From: Ryan Arredondo Date: Wed, 4 Oct 2023 19:39:09 -0500 Subject: [PATCH] Allow NoneType for ModelAdmin.actions (#198) This commit updates the `actions` attribute on the `ModelAdmin` class to allow NoneType. According the [Django docs](https://docs.djangoproject.com/en/4.2/ref/contrib/admin/actions/#disabling-all-actions-for-a-particular-modeladmin) this option is used to disable all actions for a ModelAdmin page. --- django-stubs/contrib/admin/options.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django-stubs/contrib/admin/options.pyi b/django-stubs/contrib/admin/options.pyi index c73e65956..9832bf101 100644 --- a/django-stubs/contrib/admin/options.pyi +++ b/django-stubs/contrib/admin/options.pyi @@ -166,7 +166,7 @@ class ModelAdmin(BaseModelAdmin[_ModelT]): actions: Sequence[ Callable[[ModelAdmin[Any], HttpRequest, QuerySet[Any]], HttpResponse | None] | str - ] = ... + ] | None = ... action_form: Any = ... actions_on_top: bool = ... actions_on_bottom: bool = ...