mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-04-24 15:27:17 +00:00
use autodoc_mock_imports instead of custom mocking for docs
This commit is contained in:
parent
e3347aec2d
commit
cbd1d3d5b8
10
docs/conf.py
10
docs/conf.py
@ -14,7 +14,6 @@ import os
|
||||
import sys
|
||||
|
||||
from pathlib import Path
|
||||
from unittest import mock
|
||||
|
||||
from ahriman.version import __version__
|
||||
|
||||
@ -24,13 +23,6 @@ sys.path.insert(0, str(basedir))
|
||||
|
||||
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 -----------------------------------------------------
|
||||
|
||||
@ -92,6 +84,8 @@ autoclass_content = "both"
|
||||
|
||||
autodoc_member_order = "groupwise"
|
||||
|
||||
autodoc_mock_imports = ["pyalpm"]
|
||||
|
||||
autodoc_default_options = {
|
||||
"no-undoc-members": True,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user