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