Skip to content

Commit

Permalink
resolves issue tardis-sn#1370 bad YAML Output (tardis-sn#1546)
Browse files Browse the repository at this point in the history
  • Loading branch information
atharva-2001 authored Apr 26, 2021
1 parent 84d728b commit e9dd506
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,13 @@ def to_html_ext(path):
return os.path.splitext(path)[0] + ".html"


def autodoc_skip_member(app, what, name, obj, skip, options):
"""Exclude specific functions/methods from the documentation"""
exclusions = ("yaml_constructors", "yaml_implicit_resolvers")
exclude = name in exclusions
return skip or exclude


def create_redirect_files(app, docname):
"""Create redirect html files at old paths specified in `redirects` list."""
template_html_path = os.path.join(
Expand All @@ -224,4 +231,5 @@ def create_redirect_files(app, docname):


def setup(app):
app.connect("autodoc-skip-member", autodoc_skip_member)
app.connect("build-finished", create_redirect_files)

0 comments on commit e9dd506

Please sign in to comment.