mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
legacy_urls: Add type annotation to legacy_urls.
Mypy previously infers this to be `List[URLPattern]` which is incompatible with other urls lists that we concatenate this with. Signed-off-by: Zixuan James Li <p359101898@gmail.com>
This commit is contained in:
committed by
Tim Abbott
parent
8fae87e2df
commit
929311642b
@@ -1,4 +1,6 @@
|
|||||||
from django.urls import path
|
from typing import List, Union
|
||||||
|
|
||||||
|
from django.urls import URLPattern, URLResolver, path
|
||||||
|
|
||||||
import zerver.views
|
import zerver.views
|
||||||
import zerver.views.auth
|
import zerver.views.auth
|
||||||
@@ -8,7 +10,7 @@ import zerver.views.tutorial
|
|||||||
|
|
||||||
# Future endpoints should add to urls.py, which includes these legacy URLs
|
# Future endpoints should add to urls.py, which includes these legacy URLs
|
||||||
|
|
||||||
legacy_urls = [
|
legacy_urls: List[Union[URLPattern, URLResolver]] = [
|
||||||
# These are json format views used by the web client. They require a logged in browser.
|
# These are json format views used by the web client. They require a logged in browser.
|
||||||
# We should remove this endpoint and all code related to it.
|
# We should remove this endpoint and all code related to it.
|
||||||
# It returns a 404 if the stream doesn't exist, which is confusing
|
# It returns a 404 if the stream doesn't exist, which is confusing
|
||||||
|
Reference in New Issue
Block a user