mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge branch '4.0.x' into 4.x
This commit is contained in:
commit
1513d50774
2
CHANGES
2
CHANGES
@ -68,6 +68,8 @@ Features added
|
||||
Bugs fixed
|
||||
----------
|
||||
|
||||
* #9210: viewcode: crashed if non importable modules found on parallel build
|
||||
|
||||
Testing
|
||||
--------
|
||||
|
||||
|
@ -150,10 +150,11 @@ def env_merge_info(app: Sphinx, env: BuildEnvironment, docnames: Iterable[str],
|
||||
if modname not in env._viewcode_modules: # type: ignore
|
||||
env._viewcode_modules[modname] = entry # type: ignore
|
||||
else:
|
||||
used = env._viewcode_modules[modname][2] # type: ignore
|
||||
for fullname, docname in entry[2].items():
|
||||
if fullname not in used:
|
||||
used[fullname] = docname
|
||||
if env._viewcode_modules[modname]: # type: ignore
|
||||
used = env._viewcode_modules[modname][2] # type: ignore
|
||||
for fullname, docname in entry[2].items():
|
||||
if fullname not in used:
|
||||
used[fullname] = docname
|
||||
|
||||
|
||||
def env_purge_doc(app: Sphinx, env: BuildEnvironment, docname: str) -> None:
|
||||
|
@ -214,7 +214,11 @@ def test_signature_annotations():
|
||||
|
||||
# optional union
|
||||
sig = inspect.signature(f20)
|
||||
assert stringify_signature(sig) == '() -> Optional[Union[int, str]]'
|
||||
if sys.version_info < (3, 7):
|
||||
assert stringify_signature(sig) in ('() -> Optional[Union[int, str]]',
|
||||
'() -> Optional[Union[str, int]]')
|
||||
else:
|
||||
assert stringify_signature(sig) == '() -> Optional[Union[int, str]]'
|
||||
|
||||
# Any
|
||||
sig = inspect.signature(f14)
|
||||
|
Loading…
Reference in New Issue
Block a user