summaryrefslogtreecommitdiff
path: root/sphinx/util/docutils.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2019-10-20 18:54:41 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2019-10-20 19:01:20 +0900
commitee45bb310bd76b5565af7092cfda279f92e19e9a (patch)
tree020210eb4d4c82e1e4f67950438a8cd739026e7d /sphinx/util/docutils.py
parentf30e2af762cb678037340112242e0d33134a1b12 (diff)
downloadsphinx-git-ee45bb310bd76b5565af7092cfda279f92e19e9a.tar.gz
Don't return False always on __exit__()
According to the python/mypy#7214, mypy-0.740 prefers a return value of __exit__() method which does not swallow exceptions is None instead of bool. mypy#7214: https://github.com/python/mypy/issues/7214
Diffstat (limited to 'sphinx/util/docutils.py')
-rw-r--r--sphinx/util/docutils.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/sphinx/util/docutils.py b/sphinx/util/docutils.py
index e455d0aad..233c1a2aa 100644
--- a/sphinx/util/docutils.py
+++ b/sphinx/util/docutils.py
@@ -187,9 +187,8 @@ class sphinx_domains:
def __enter__(self) -> None:
self.enable()
- def __exit__(self, exc_type: "Type[Exception]", exc_value: Exception, traceback: Any) -> bool: # type: ignore # NOQA
+ def __exit__(self, exc_type: "Type[Exception]", exc_value: Exception, traceback: Any) -> None: # NOQA
self.disable()
- return False
def enable(self) -> None:
self.directive_func = directives.directive