Autodoc: Ignorování modulů

This commit is contained in:
Pavel "LEdoian" Turinsky 2023-01-02 21:13:15 +01:00
parent e10a8e0b6d
commit 3c3047b548

View file

@ -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)