From efbb3ebf115585aafe23ecbdb15ce0aa255ceff6 Mon Sep 17 00:00:00 2001 From: rarredon Date: Wed, 4 Oct 2023 14:40:43 -0500 Subject: [PATCH] Allow NoneType for ModelAdmin.actions 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 particular 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 = ...