diff --git a/sphinx/application.py b/sphinx/application.py index 7e9600b16d5..a994e4bd57b 100644 --- a/sphinx/application.py +++ b/sphinx/application.py @@ -392,7 +392,8 @@ def build(self, force_all: bool = False, filenames: list[str] | None = None) -> elif self._warncount == 1: if self._warning_is_error: self.statuscode = 1 - msg = __('build finished with problems, %s warning (with warnings treated as errors).') + msg = __('build finished with problems, %s warning ' + '(with warnings treated as errors).') elif self.statuscode != 0: msg = __('build finished with problems, %s warning.') else: @@ -401,7 +402,8 @@ def build(self, force_all: bool = False, filenames: list[str] | None = None) -> else: if self._warning_is_error: self.statuscode = 1 - msg = __('build finished with problems, %s warnings (with warnings treated as errors).') + msg = __('build finished with problems, %s warnings ' + '(with warnings treated as errors).') elif self.statuscode != 0: msg = __('build finished with problems, %s warnings.') else: diff --git a/tests/test_util/test_util_logging.py b/tests/test_util/test_util_logging.py index bc7bf3e1b2c..0b40d50977a 100644 --- a/tests/test_util/test_util_logging.py +++ b/tests/test_util/test_util_logging.py @@ -7,7 +7,6 @@ import pytest from docutils import nodes -from sphinx.errors import SphinxWarning from sphinx.util import logging, osutil from sphinx.util.console import colorize, strip_colors from sphinx.util.logging import is_suppressed_warning, prefixed_warnings