openapi: Add missing __init__.py; fix type errors hidden by its absence.

The absence of __init__.py was preventing mypy from following any of
the zerver.openapi imports.  These errors were being silenced by
ignore_missing_imports.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2021-07-02 22:37:59 -07:00
committed by Tim Abbott
parent 985e95041d
commit 24c239d991
5 changed files with 7 additions and 7 deletions

View File

@@ -153,6 +153,8 @@ class MarkdownDirectoryView(ApiURLView):
documentation_article.endpoint_path,
documentation_article.endpoint_method,
)
assert endpoint_name is not None
assert endpoint_method is not None
article_title = get_openapi_summary(endpoint_name, endpoint_method)
elif self.path_template == "/zerver/api/%s.md" and "{generate_api_title(" in first_line:
api_operation = context["OPEN_GRAPH_URL"].split("/api/")[1].replace("-", "_")