From 4958d2abf1abb1c3a10e77d8297a746cc90d5234 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20B?= <2589111+jfbu@users.noreply.github.com> Date: Sun, 30 Jul 2023 15:00:55 +0200 Subject: [PATCH] Fix flake8 E231 reported linting failure --- sphinx/builders/linkcheck.py | 2 +- tests/test_build_linkcheck.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sphinx/builders/linkcheck.py b/sphinx/builders/linkcheck.py index 3592f9551fd..1b7b56eeea3 100644 --- a/sphinx/builders/linkcheck.py +++ b/sphinx/builders/linkcheck.py @@ -65,7 +65,7 @@ def finish(self) -> None: output_text = path.join(self.outdir, 'output.txt') output_json = path.join(self.outdir, 'output.json') - with open(output_text, 'w', encoding='utf-8') as self.txt_outfile,\ + with open(output_text, 'w', encoding='utf-8') as self.txt_outfile, \ open(output_json, 'w', encoding='utf-8') as self.json_outfile: for result in checker.check(self.hyperlinks): self.process_result(result) diff --git a/tests/test_build_linkcheck.py b/tests/test_build_linkcheck.py index 10163559749..42e4e03521b 100644 --- a/tests/test_build_linkcheck.py +++ b/tests/test_build_linkcheck.py @@ -782,7 +782,7 @@ def test_too_many_requests_retry_after_HTTP_date(app, capsys): @pytest.mark.sphinx('linkcheck', testroot='linkcheck-localserver', freshenv=True) def test_too_many_requests_retry_after_without_header(app, capsys): - with http_server(make_retry_after_handler([(429, None), (200, None)])),\ + with http_server(make_retry_after_handler([(429, None), (200, None)])), \ mock.patch("sphinx.builders.linkcheck.DEFAULT_DELAY", 0): app.build() content = (app.outdir / 'output.json').read_text(encoding='utf8')