From 32af240af3d2eba85152e712ca2fadfa4430eadb Mon Sep 17 00:00:00 2001 From: Zixuan James Li Date: Tue, 19 Jul 2022 11:49:23 -0400 Subject: [PATCH] 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 --- zerver/views/documentation.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/zerver/views/documentation.py b/zerver/views/documentation.py index a039aa96fd..dcb805b4ce 100644 --- a/zerver/views/documentation.py +++ b/zerver/views/documentation.py @@ -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.