mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user