mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge branch '4.1.x' into 4.x
This commit is contained in:
commit
52fd229dda
2
CHANGES
2
CHANGES
@ -50,6 +50,8 @@ Bugs fixed
|
||||
with the HEAD of 3.10
|
||||
* #9490: autodoc: Some objects under ``typing`` module are not displayed well
|
||||
with the HEAD of 3.10
|
||||
* #9436, #9471: autodoc: crashed if ``autodoc_class_signature = "separated"``
|
||||
* #9456: html search: html_copy_source can't control the search summaries
|
||||
* #9435: linkcheck: Failed to check anchors in github.com
|
||||
|
||||
Testing
|
||||
|
@ -257,6 +257,9 @@ def between(marker: str, what: Sequence[str] = None, keepempty: bool = False,
|
||||
# But we define this class here to keep compatibility (see #4538)
|
||||
class Options(dict):
|
||||
"""A dict/attribute hybrid that returns None on nonexisting keys."""
|
||||
def copy(self) -> "Options":
|
||||
return Options(super().copy())
|
||||
|
||||
def __getattr__(self, name: str) -> Any:
|
||||
try:
|
||||
return self[name.replace('_', '-')]
|
||||
@ -1445,9 +1448,11 @@ class ClassDocumenter(DocstringSignatureMixin, ModuleLevelDocumenter): # type:
|
||||
super().__init__(*args)
|
||||
|
||||
if self.config.autodoc_class_signature == 'separated':
|
||||
self.options = self.options.copy()
|
||||
|
||||
# show __init__() method
|
||||
if self.options.special_members is None:
|
||||
self.options['special-members'] = {'__new__', '__init__'}
|
||||
self.options['special-members'] = ['__new__', '__init__']
|
||||
else:
|
||||
self.options.special_members.append('__new__')
|
||||
self.options.special_members.append('__init__')
|
||||
|
@ -276,7 +276,7 @@ var Search = {
|
||||
setTimeout(function() {
|
||||
displayNextItem();
|
||||
}, 5);
|
||||
} else {
|
||||
} else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) {
|
||||
$.ajax({url: requestUrl,
|
||||
dataType: "text",
|
||||
complete: function(jqxhr, textstatus) {
|
||||
@ -289,6 +289,12 @@ var Search = {
|
||||
displayNextItem();
|
||||
}, 5);
|
||||
}});
|
||||
} else {
|
||||
// no source available, just display title
|
||||
Search.output.append(listItem);
|
||||
setTimeout(function() {
|
||||
displayNextItem();
|
||||
}, 5);
|
||||
}
|
||||
}
|
||||
// search finished, update title and status message
|
||||
|
Loading…
Reference in New Issue
Block a user