diff --git a/docs/api.rst b/docs/api.rst index 0425c947..54150625 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -72,8 +72,14 @@ API reference .. automodapi:: safir.middleware.x_forwarded :include-all-objects: +.. + If all objects from safir.pydantic are included, the pages for the + Pydantic types are generated but not linked into any table of contents. + This is probably a but in automodapi and should be checked against later + verisons to see if it's fixed. Once this is fixed, the nitpick exclusions + in documenteer.yaml can also be removed. + .. automodapi:: safir.pydantic - :include-all-objects: .. automodapi:: safir.redis :include-all-objects: diff --git a/docs/documenteer.toml b/docs/documenteer.toml index 358490bc..c6dd17d1 100644 --- a/docs/documenteer.toml +++ b/docs/documenteer.toml @@ -17,19 +17,20 @@ nitpick_ignore_regex = [ ['py:.*', 'starlette.*'], ] nitpick_ignore = [ - ['py:class', 'unittest.mock.Base'], - ['py:class', 'unittest.mock.CallableMixin'], + # These don't appear to have documentation but show up in the inheritance + # tree. + ["py:class", "unittest.mock.Base"], + ["py:class", "unittest.mock.CallableMixin"], + # autodoc_pydantic generates some spurious links that can't be resolved. ["py:obj", "ComputedFieldInfo"], - ["py:obj", "JobMetadata.id"], - ["py:class", "pydantic.BaseModel"], - ["py:class", "BaseModel"], + ["py:class", "lambda"], # arq doesn't provide documentation for all of its types. ["py:class", "arq.cron.CronJob"], ["py:class", "arq.typing.StartupShutdown"], ["py:class", "arq.typing.WorkerCoroutine"], ["py:class", "arq.worker.Function"], - # sphinx-automodapi apparently doesn't recognize TypeAlias as an object - # that should have generated documentation, even with include-all-objects. + # Including the documentation for these generates the pages but doesn't + # include them in the table of contents, so for now they're excluded. ["py:obj", "safir.pydantic.EnvAsyncPostgresDsn"], ["py:obj", "safir.pydantic.EnvRedisDsn"], ["py:obj", "safir.pydantic.HumanTimedelta"],