From 3c3047b5486b2e696853de318e94d74497f7a8b9 Mon Sep 17 00:00:00 2001 From: "Pavel \"LEdoian\" Turinsky" Date: Mon, 2 Jan 2023 21:13:15 +0100 Subject: [PATCH] =?UTF-8?q?Autodoc:=20Ignorov=C3=A1n=C3=AD=20modul=C5=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/conf.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/conf.py b/docs/conf.py index d597faf2..038e7428 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -85,3 +85,17 @@ source_suffix = { '.rst': 'restructuredtext', '.md': 'markdown', } + +# Autodoc má ignorovat některé moduly +# Ref: https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#event-autodoc-skip-member +# Kudos: https://stackoverflow.com/a/21449475/ +def ignorovat(app, what, name. obj, skip, options): + blacklist = ( + # typ (what), name + ('module', 'settings.mamweb_prod'), + ) + ignore = (what, name) in blacklist + return True if ignore else None + +def setup(app): + app.connect('autodoc-skip-member', ignorovat)