summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2020-03-12 01:25:18 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2020-03-12 01:25:18 +0900
commit99476f37e7af75a729aa7bbf301e94aa8da57196 (patch)
tree27e0d451a48abcaac31ae05c64a2ddbaa2a2fe4c
parent4a1bf03233dea42595fd6efe5beea6d3ee2252f8 (diff)
downloadsphinx-git-99476f37e7af75a729aa7bbf301e94aa8da57196.tar.gz
Fix mypy violations (with mypy-0.770)
-rw-r--r--setup.py2
-rw-r--r--sphinx/application.py2
-rw-r--r--sphinx/util/console.py2
-rw-r--r--sphinx/util/nodes.py2
4 files changed, 4 insertions, 4 deletions
diff --git a/setup.py b/setup.py
index 55578350f..37c7afcc5 100644
--- a/setup.py
+++ b/setup.py
@@ -47,7 +47,7 @@ extras_require = {
'html5lib',
'flake8>=3.5.0',
'flake8-import-order',
- 'mypy>=0.761',
+ 'mypy>=0.770',
'docutils-stubs',
],
}
diff --git a/sphinx/application.py b/sphinx/application.py
index 744e62a4e..152c8bb43 100644
--- a/sphinx/application.py
+++ b/sphinx/application.py
@@ -497,7 +497,7 @@ class Sphinx:
other values.
"""
logger.debug('[app] adding config value: %r',
- (name, default, rebuild) + ((types,) if types else ())) # type: ignore
+ (name, default, rebuild) + ((types,) if types else ()))
if rebuild in (False, True):
rebuild = 'env' if rebuild else ''
self.config.add(name, default, rebuild, types)
diff --git a/sphinx/util/console.py b/sphinx/util/console.py
index f4c80d288..08aad8ab1 100644
--- a/sphinx/util/console.py
+++ b/sphinx/util/console.py
@@ -35,7 +35,7 @@ def get_terminal_width() -> int:
import termios
import fcntl
import struct
- call = fcntl.ioctl(0, termios.TIOCGWINSZ,
+ call = fcntl.ioctl(0, termios.TIOCGWINSZ, # type: ignore
struct.pack('hhhh', 0, 0, 0, 0))
height, width = struct.unpack('hhhh', call)[:2]
terminal_width = width
diff --git a/sphinx/util/nodes.py b/sphinx/util/nodes.py
index 7c7300c60..a5ab83f5d 100644
--- a/sphinx/util/nodes.py
+++ b/sphinx/util/nodes.py
@@ -199,7 +199,7 @@ def is_translatable(node: Node) -> bool:
if isinstance(node, addnodes.translatable):
return True
- if isinstance(node, nodes.Inline) and 'translatable' not in node:
+ if isinstance(node, nodes.Inline) and 'translatable' not in node: # type: ignore
# inline node must not be translated if 'translatable' is not set
return False