Skip to content

Commit b42d781

Browse files
committed
chore: Add types
1 parent 099e368 commit b42d781

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

djangocms_alias/admin.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
from __future__ import annotations
22

3+
from collections.abc import Iterable
4+
35
from cms.admin.utils import GrouperModelAdmin
46
from cms.utils.permissions import get_model_permission_codename
57
from cms.utils.urlutils import admin_reverse
@@ -74,12 +76,12 @@ def get_actions_list(self) -> list:
7476
"""Add alias usage list actions"""
7577
return super().get_actions_list() + [self._get_alias_usage_link, self._get_alias_delete_link]
7678

77-
def get_queryset(self, request):
79+
def get_queryset(self, request: HttpRequest) -> models.QuerySet:
7880
qs = super().get_queryset(request)
7981
# Annotate each Alias with a boolean indicating if related cmsplugins exist
8082
return qs.annotate(cmsplugins_count=models.Count("cms_plugins"))
8183

82-
def get_list_display(self, request):
84+
def get_list_display(self, request: HttpRequest) -> Iterable[str]:
8385
list_display = super().get_list_display(request)
8486
if hasattr(self, "get_author"):
8587
list_display = list(list_display)

0 commit comments

Comments
 (0)