Merge branch '2.0' into 6889_autodoc_trailing_comma

This commit is contained in:
Takeshi KOMIYA 2020-01-31 01:12:18 +09:00 committed by GitHub
commit d52f3db148
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -64,6 +64,7 @@ Bugs fixed
* #7023: autodoc: partial functions imported from other modules are listed as * #7023: autodoc: partial functions imported from other modules are listed as
module members without :impoprted-members: option module members without :impoprted-members: option
* #6889: autodoc: Trailing comma in ``:members::`` option causes cryptic warning * #6889: autodoc: Trailing comma in ``:members::`` option causes cryptic warning
* #7055: linkcheck: redirect is treated as an error
Testing Testing
-------- --------

View File

@ -26,7 +26,7 @@ from sphinx.builders import Builder
from sphinx.locale import __ from sphinx.locale import __
from sphinx.util import encode_uri, requests, logging from sphinx.util import encode_uri, requests, logging
from sphinx.util.console import ( # type: ignore from sphinx.util.console import ( # type: ignore
purple, red, darkgreen, darkgray, darkred, turquoise purple, red, darkgreen, darkgray, turquoise
) )
from sphinx.util.nodes import get_node_line from sphinx.util.nodes import get_node_line
from sphinx.util.requests import is_ssl_error from sphinx.util.requests import is_ssl_error
@ -251,11 +251,11 @@ class CheckExternalLinksBuilder(Builder):
elif status == 'redirected': elif status == 'redirected':
try: try:
text, color = { text, color = {
301: ('permanently', darkred), 301: ('permanently', purple),
302: ('with Found', purple), 302: ('with Found', purple),
303: ('with See Other', purple), 303: ('with See Other', purple),
307: ('temporarily', turquoise), 307: ('temporarily', turquoise),
308: ('permanently', darkred), 308: ('permanently', purple),
}[code] }[code]
except KeyError: except KeyError:
text, color = ('with unknown code', purple) text, color = ('with unknown code', purple)