Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sphinx-doc/sphinx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2021-12-16 20:01:33 +0300
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2021-12-16 20:01:33 +0300
commit95d64787470f084d532b11a591d9e835a9169cea (patch)
tree40f0f7d4364a635537874603c083741105767b57 /sphinx/util
parent3ae124f8ac038a3ca79aa266d4558fd85c6e6032 (diff)
Fix mypy violations (with mypy-0.920)
Diffstat (limited to 'sphinx/util')
-rw-r--r--sphinx/util/__init__.py4
-rw-r--r--sphinx/util/inspect.py2
-rw-r--r--sphinx/util/logging.py2
3 files changed, 4 insertions, 4 deletions
diff --git a/sphinx/util/__init__.py b/sphinx/util/__init__.py
index 384925157..b7b33a820 100644
--- a/sphinx/util/__init__.py
+++ b/sphinx/util/__init__.py
@@ -153,7 +153,7 @@ def md5(data=b'', **kwargs):
"""
try:
- return hashlib.md5(data, **kwargs) # type: ignore
+ return hashlib.md5(data, **kwargs)
except ValueError:
return hashlib.md5(data, **kwargs, usedforsecurity=False) # type: ignore
@@ -167,7 +167,7 @@ def sha1(data=b'', **kwargs):
"""
try:
- return hashlib.sha1(data, **kwargs) # type: ignore
+ return hashlib.sha1(data, **kwargs)
except ValueError:
return hashlib.sha1(data, **kwargs, usedforsecurity=False) # type: ignore
diff --git a/sphinx/util/inspect.py b/sphinx/util/inspect.py
index 24ea49ae0..d590adff2 100644
--- a/sphinx/util/inspect.py
+++ b/sphinx/util/inspect.py
@@ -355,7 +355,7 @@ def is_singledispatch_function(obj: Any) -> bool:
if (inspect.isfunction(obj) and
hasattr(obj, 'dispatch') and
hasattr(obj, 'register') and
- obj.dispatch.__module__ == 'functools'):
+ obj.dispatch.__module__ == 'functools'): # type: ignore
return True
else:
return False
diff --git a/sphinx/util/logging.py b/sphinx/util/logging.py
index bdf77dc07..ae8fc25cf 100644
--- a/sphinx/util/logging.py
+++ b/sphinx/util/logging.py
@@ -118,7 +118,7 @@ class SphinxLoggerAdapter(logging.LoggerAdapter):
"""LoggerAdapter allowing ``type`` and ``subtype`` keywords."""
KEYWORDS = ['type', 'subtype', 'location', 'nonl', 'color', 'once']
- def log(self, level: Union[int, str], msg: str, *args: Any, **kwargs: Any) -> None:
+ def log(self, level: Union[int, str], msg: str, *args: Any, **kwargs: Any) -> None: # type: ignore # NOQA
if isinstance(level, int):
super().log(level, msg, *args, **kwargs)
else: