From e023d1082d574d422ce50a8a99c8c012d6a21f92 Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Sat, 1 Jan 2022 20:03:17 +0900 Subject: [PATCH 1/3] A happy new year! (again) --- sphinx/locale/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sphinx/locale/__init__.py b/sphinx/locale/__init__.py index 8fc6c1519..5378da0a3 100644 --- a/sphinx/locale/__init__.py +++ b/sphinx/locale/__init__.py @@ -4,7 +4,7 @@ Locale utilities. - :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ From a98b605100a7d8bff146b7776cfefef9f452904f Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Sun, 9 Jan 2022 00:54:35 +0900 Subject: [PATCH 2/3] Fix mypy violations (with mypy-0.931) --- setup.py | 2 +- sphinx/directives/patches.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 44da14d09..a8279a14f 100644 --- a/setup.py +++ b/setup.py @@ -44,7 +44,7 @@ extras_require = { 'lint': [ 'flake8>=3.5.0', 'isort', - 'mypy>=0.930', + 'mypy>=0.931', 'docutils-stubs', "types-typed-ast", "types-pkg_resources", diff --git a/sphinx/directives/patches.py b/sphinx/directives/patches.py index f01423a88..056baa496 100644 --- a/sphinx/directives/patches.py +++ b/sphinx/directives/patches.py @@ -9,7 +9,7 @@ import os import warnings from os import path -from typing import TYPE_CHECKING, Any, Dict, List, Tuple, cast +from typing import TYPE_CHECKING, Any, Dict, List, Sequence, Tuple, cast from docutils import nodes from docutils.nodes import Node, make_id, system_message @@ -71,7 +71,7 @@ class Figure(images.Figure): class Meta(MetaBase, SphinxDirective): - def run(self) -> List[Node]: + def run(self) -> Sequence[Node]: result = super().run() for node in result: if (isinstance(node, nodes.pending) and From a80023f381e8458a77e730385357fe1fd309790d Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Sun, 9 Jan 2022 00:59:32 +0900 Subject: [PATCH 3/3] Fix mypy violations (with types-requests-2.27.3) --- sphinx/util/requests.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sphinx/util/requests.py b/sphinx/util/requests.py index bd9a94338..581efbfd5 100644 --- a/sphinx/util/requests.py +++ b/sphinx/util/requests.py @@ -25,17 +25,17 @@ try: except ImportError: # python-requests package in Debian jessie does not provide ``requests.packages.urllib3``. # So try to import the exceptions from urllib3 package. - from urllib3.exceptions import SSLError # type: ignore + from urllib3.exceptions import SSLError try: from requests.packages.urllib3.exceptions import InsecureRequestWarning except ImportError: try: # for Debian-jessie - from urllib3.exceptions import InsecureRequestWarning # type: ignore + from urllib3.exceptions import InsecureRequestWarning except ImportError: # for requests < 2.4.0 - InsecureRequestWarning = None # type: ignore + InsecureRequestWarning = None useragent_header = [('User-Agent',