From ab5db5ae1c0e27511d7761b4e86f631b17430874 Mon Sep 17 00:00:00 2001 From: Elias Bonnici Date: Fri, 8 Nov 2024 16:01:02 +0100 Subject: [PATCH] Use `autoapi-skip-member` --- docs/conf.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 3732e61..2cca0a4 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -192,5 +192,16 @@ def get_version(): # Custom config -autodoc_member_order = "bysource" autoapi_dirs = ["../fido2"] + +skip_patterns = ["fido2.hid", "fido2.win_api"] + + +def skip_submodules(app, what, name, obj, skip, options): + if what == "module" and any(name.startswith(pattern) for pattern in skip_patterns): + skip = True + return skip + + +def setup(sphinx): + sphinx.connect("autoapi-skip-member", skip_submodules)