diff --git a/sphinx/builders/linkcheck.py b/sphinx/builders/linkcheck.py index b43849022..8079b680a 100644 --- a/sphinx/builders/linkcheck.py +++ b/sphinx/builders/linkcheck.py @@ -122,7 +122,10 @@ class CheckExternalLinksBuilder(Builder): # type: () -> None kwargs = { 'allow_redirects': True, - 'headers': {'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'}, + 'headers': { + 'Accept': ('text/html,application/xhtml+xml,' + 'application/xml;q=0.9,*/*;q=0.8') + }, } if self.app.config.linkcheck_timeout: kwargs['timeout'] = self.app.config.linkcheck_timeout