documentation: Make get compatible with the supertype.

The supertype contains `*args` and `**kwargs`, this adapts the signature
of the `get` method to make MarkdownDirectoryView compatible with it.

Signed-off-by: Zixuan James Li <p359101898@gmail.com>
This commit is contained in:
Zixuan James Li
2022-07-19 11:49:23 -04:00
committed by Tim Abbott
parent 5a15fd1dd2
commit 32af240af3

View File

@@ -223,7 +223,9 @@ class MarkdownDirectoryView(ApiURLView):
add_google_analytics_context(context)
return context
def get(self, request: HttpRequest, article: str = "") -> HttpResponse:
def get(
self, request: HttpRequest, *args: object, article: str = "", **kwargs: object
) -> HttpResponse:
# Hack: It's hard to reinitialize urls.py from tests, and so
# we want to defer the use of settings.POLICIES_DIRECTORY to
# runtime.