diff options
author | 2021-04-15 16:24:38 +0300 | |
---|---|---|
committer | 2021-05-03 20:19:50 +0300 | |
commit | a526e3eb1a2b9f2268dc800661ad033d32380fb4 (patch) | |
tree | c79abe7fcacac83c8d077b91fd620c7330f3949b /pydis_site/apps | |
parent | Create custom RedirectView to support static arguments (diff) |
Add missing type annotation to get_redirect_url
Diffstat (limited to 'pydis_site/apps')
-rw-r--r-- | pydis_site/apps/redirect/views.py | 4 |
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) |