diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2022-01-09 01:07:56 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-09 01:07:56 +0900 |
commit | c81dd9b82f2f33a4cd91e6f065663e1ca6b460be (patch) | |
tree | a3d7e0c5023e681d21d1b39efe43b56d6e73a950 | |
parent | 91f95728174018aec26f3aa92649d41f63bbde60 (diff) | |
parent | a80023f381e8458a77e730385357fe1fd309790d (diff) | |
download | sphinx-git-4.3.x.tar.gz |
Merge pull request #10065 from tk0miya/mypy-0.9314.3.x
Fix mypy violations (with mypy-0.931)
-rw-r--r-- | setup.py | 2 | ||||
-rw-r--r-- | sphinx/directives/patches.py | 4 | ||||
-rw-r--r-- | sphinx/util/requests.py | 6 |
3 files changed, 6 insertions, 6 deletions
@@ -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 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', |