aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar ks129 <[email protected]>2021-04-15 16:24:38 +0300
committerGravatar ks129 <[email protected]>2021-05-03 20:19:50 +0300
commita526e3eb1a2b9f2268dc800661ad033d32380fb4 (patch)
treec79abe7fcacac83c8d077b91fd620c7330f3949b
parentCreate custom RedirectView to support static arguments (diff)
Add missing type annotation to get_redirect_url
-rw-r--r--pydis_site/apps/redirect/views.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/pydis_site/apps/redirect/views.py b/pydis_site/apps/redirect/views.py
index 9a4bfd65..f0dc6825 100644
--- a/pydis_site/apps/redirect/views.py
+++ b/pydis_site/apps/redirect/views.py
@@ -1,3 +1,5 @@
+import typing as t
+
from django.views.generic import RedirectView
@@ -12,7 +14,7 @@ class CustomRedirectView(RedirectView):
"""Overwrites original as_view to add static args."""
return super().as_view(**initkwargs)
- def get_redirect_url(self, *args, **kwargs):
+ def get_redirect_url(self, *args, **kwargs) -> t.Optional[str]:
"""Extends default behaviour to use static args."""
args = args + self.static_args
return super().get_redirect_url(*args, **kwargs)