Skip to content

Commit

Permalink
fix: removed some pydantic properties from the documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
provos committed Sep 16, 2024
1 parent c8ef37f commit 3328827
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import os
import sys

import sphinx_rtd_theme

sys.path.insert(0, os.path.abspath("../../src"))
Expand Down Expand Up @@ -32,6 +33,29 @@
templates_path = ["_templates"]
exclude_patterns = []

autodoc_default_options = {
"inherited-members": False,
}

# Define list of undesired members from BaseModel
undesired_members = [
"model_fields",
"model_post_init",
"model_computed_fields",
"model_config",
# Add any other Pydantic BaseModel members you want to exclude
]


def should_skip(app, what, name, obj, skip, options):
if name in undesired_members:
return True
return skip


def setup(app):
app.connect("autodoc-skip-member", should_skip)


# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
Expand Down

0 comments on commit 3328827

Please sign in to comment.