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):