diff --git a/docs/conf.py b/docs/conf.py index b6d48401..45586562 100644 --- a/docs/conf.py +++ b/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, }