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
|
Bugs fixed
|
||||||
----------
|
----------
|
||||||
|
|
||||||
|
* #9210: viewcode: crashed if non importable modules found on parallel build
|
||||||
|
|
||||||
Testing
|
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
|
if modname not in env._viewcode_modules: # type: ignore
|
||||||
env._viewcode_modules[modname] = entry # type: ignore
|
env._viewcode_modules[modname] = entry # type: ignore
|
||||||
else:
|
else:
|
||||||
used = env._viewcode_modules[modname][2] # type: ignore
|
if env._viewcode_modules[modname]: # type: ignore
|
||||||
for fullname, docname in entry[2].items():
|
used = env._viewcode_modules[modname][2] # type: ignore
|
||||||
if fullname not in used:
|
for fullname, docname in entry[2].items():
|
||||||
used[fullname] = docname
|
if fullname not in used:
|
||||||
|
used[fullname] = docname
|
||||||
|
|
||||||
|
|
||||||
def env_purge_doc(app: Sphinx, env: BuildEnvironment, docname: str) -> None:
|
def env_purge_doc(app: Sphinx, env: BuildEnvironment, docname: str) -> None:
|
||||||
|
@ -214,7 +214,11 @@ def test_signature_annotations():
|
|||||||
|
|
||||||
# optional union
|
# optional union
|
||||||
sig = inspect.signature(f20)
|
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
|
# Any
|
||||||
sig = inspect.signature(f14)
|
sig = inspect.signature(f14)
|
||||||
|
Loading…
Reference in New Issue
Block a user