Open rra opened 2 months ago
Hi @rra,
thanks for raising the issue here!
This could be very well a bug because autodoc_pydantic
does resolve refs for reusable validators. Solving it could be a bit tricky.
I won't be able to take a look at it short-term. Any help is appreciated :-).
I have Python code that uses a validator from an external library. A simplified example:
normalize_datetime
is actually defined insafir.pydantic._validators
, but is then imported and re-exported bysafir.pydantic
. The intersphinxobjects.inv
record is forsafir.pydantic.normalize_datetime
.When formatting this documentation, with Sphinx documentation for
AdminHistoryEntry
generated by autodoc_pydantic, I get the following warning:I tried adding the
sphinx_automodapi.smart_resolver
extension, which I think is supposed to handle patterns like this, without any change.I'm using this pattern in multiple places and all of the function and class references resolve fine except this validator pattern, which makes me think it may be a problem with autodoc_pydantic.