mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-04-24 23:37:18 +00:00
use autodoc_mock_imports instead of custom mocking for docs
This commit is contained in:
parent
041e9536bf
commit
d495163fdd
10
docs/conf.py
10
docs/conf.py
@ -14,7 +14,6 @@ import os
|
|||||||
import sys
|
import sys
|
||||||
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from unittest import mock
|
|
||||||
|
|
||||||
from ahriman.version import __version__
|
from ahriman.version import __version__
|
||||||
|
|
||||||
@ -24,13 +23,6 @@ sys.path.insert(0, str(basedir))
|
|||||||
|
|
||||||
on_rtd = os.environ.get("READTHEDOCS", None) == "True"
|
on_rtd = os.environ.get("READTHEDOCS", None) == "True"
|
||||||
|
|
||||||
for module in (
|
|
||||||
"pyalpm",
|
|
||||||
):
|
|
||||||
if module in sys.modules:
|
|
||||||
continue
|
|
||||||
sys.modules[module] = mock.Mock()
|
|
||||||
|
|
||||||
|
|
||||||
# -- Project information -----------------------------------------------------
|
# -- Project information -----------------------------------------------------
|
||||||
|
|
||||||
@ -92,6 +84,8 @@ autoclass_content = "both"
|
|||||||
|
|
||||||
autodoc_member_order = "groupwise"
|
autodoc_member_order = "groupwise"
|
||||||
|
|
||||||
|
autodoc_mock_imports = ["pyalpm"]
|
||||||
|
|
||||||
autodoc_default_options = {
|
autodoc_default_options = {
|
||||||
"no-undoc-members": True,
|
"no-undoc-members": True,
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user