mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix flake8 E231 reported linting failure
This commit is contained in:
parent
f683244c91
commit
eb0499a696
@ -66,7 +66,7 @@ class CheckExternalLinksBuilder(DummyBuilder):
|
|||||||
|
|
||||||
output_text = path.join(self.outdir, 'output.txt')
|
output_text = path.join(self.outdir, 'output.txt')
|
||||||
output_json = path.join(self.outdir, 'output.json')
|
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:
|
open(output_json, 'w', encoding='utf-8') as self.json_outfile:
|
||||||
for result in checker.check(self.hyperlinks):
|
for result in checker.check(self.hyperlinks):
|
||||||
self.process_result(result)
|
self.process_result(result)
|
||||||
|
@ -782,7 +782,7 @@ def test_too_many_requests_retry_after_HTTP_date(app, capsys):
|
|||||||
|
|
||||||
@pytest.mark.sphinx('linkcheck', testroot='linkcheck-localserver', freshenv=True)
|
@pytest.mark.sphinx('linkcheck', testroot='linkcheck-localserver', freshenv=True)
|
||||||
def test_too_many_requests_retry_after_without_header(app, capsys):
|
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):
|
mock.patch("sphinx.builders.linkcheck.DEFAULT_DELAY", 0):
|
||||||
app.build()
|
app.build()
|
||||||
content = (app.outdir / 'output.json').read_text(encoding='utf8')
|
content = (app.outdir / 'output.json').read_text(encoding='utf8')
|
||||||
|
Loading…
Reference in New Issue
Block a user