diff --git a/docs/conf.py b/docs/conf.py index db3dd2cf6..3659dd208 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -82,6 +82,21 @@ "sphinx_rtd_theme", ] + +def skip_pydantic_internals(app, what, name, obj, skip, options): + """ + This processor is used to filter out Pydantic internal attributes from the + documentation. + """ + if name in ("model_fields", "model_config"): + return True + return skip + + +def setup(app): + app.connect("autodoc-skip-member", skip_pydantic_internals) + + # Add any paths that contain templates here, relative to this directory. templates_path = ["_templates"]