Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9337006
D8117.id29321.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Subscribers
None
D8117.id29321.diff
View Options
diff --git a/swh/web/api/apiurls.py b/swh/web/api/apiurls.py
--- a/swh/web/api/apiurls.py
+++ b/swh/web/api/apiurls.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2017-2019 The Software Heritage developers
+# Copyright (C) 2017-2022 The Software Heritage developers
# See the AUTHORS file at the top-level directory of this distribution
# License: GNU Affero General Public License version 3, or any later version
# See top-level LICENSE file for more information
@@ -24,7 +24,7 @@
"""
- _apidoc_routes = {} # type: Dict[str, Dict[str, str]]
+ _apidoc_routes: Dict[str, Dict[str, str]] = {}
scope = "api"
@classmethod
diff --git a/swh/web/common/highlightjs.py b/swh/web/common/highlightjs.py
--- a/swh/web/common/highlightjs.py
+++ b/swh/web/common/highlightjs.py
@@ -56,7 +56,7 @@
# dictionary mapping pygment lexers to hljs languages
-_pygments_lexer_to_hljs_language = {} # type: Dict[str, str]
+_pygments_lexer_to_hljs_language: Dict[str, str] = {}
# dictionary mapping mime types to hljs languages
diff --git a/swh/web/tests/views.py b/swh/web/tests/views.py
--- a/swh/web/tests/views.py
+++ b/swh/web/tests/views.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2018-2020 The Software Heritage developers
+# Copyright (C) 2018-2022 The Software Heritage developers
# See the AUTHORS file at the top-level directory of this distribution
# License: GNU Affero General Public License version 3, or any later version
# See top-level LICENSE file for more information
@@ -19,9 +19,9 @@
from swh.web.common.highlightjs import get_hljs_language_from_filename
from swh.web.tests.data import get_tests_data
-_content_code_data_exts = {} # type: Dict[str, Dict[str, str]]
-_content_code_data_filenames = {} # type: Dict[str, Dict[str, str]]
-_content_other_data_exts = {} # type: Dict[str, Dict[str, str]]
+_content_code_data_exts: Dict[str, Dict[str, str]] = {}
+_content_code_data_filenames: Dict[str, Dict[str, str]] = {}
+_content_other_data_exts: Dict[str, Dict[str, str]] = {}
def _init_content_tests_data(data_path, data_dict, ext_key):
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Jul 3 2025, 7:50 AM (10 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3223705
Attached To
D8117: mypy: Turn old type comments into pure type annotations
Event Timeline
Log In to Comment