autodoc_pydantic icon indicating copy to clipboard operation
autodoc_pydantic copied to clipboard

Allow `autodoc_pydantic_field_signature_prefix` to be empty

Open azmeuk opened this issue 7 months ago • 1 comments

Hi. Currently autodoc_pydantic_field_signature_prefix cannot be None (else it raises an exception while documentation is built) or an empty string (else the default attribute value is used). I would love to be able to disable prefixes with autodoc_pydantic_field_signature_prefix = None. What do you think?

azmeuk avatar Dec 08 '23 13:12 azmeuk

Hi @azmeuk,

thanks for providing the feature request. It sounds reasonable to me. I will put it on the roadmap for the next feature release.

mansenfranzen avatar Dec 27 '23 22:12 mansenfranzen

@azmeuk Empty strings will now translate to empty prefixes via #285. Actually, this behavior is more clear and intuitive than the previous behavior of adding some default prefix that was not even documented anywhere. By the way, this also simplified the code base :-).

It would be great if you could test the changed behavior. To do so, please install the current dev release in your doc-building-environment via pip install git+https://github.com/mansenfranzen/[email protected] and rebuild your docs.

Please reopen if any issues persist.

mansenfranzen avatar Apr 26 '24 13:04 mansenfranzen

@all-contributors please add @azmeuk for bug

mansenfranzen avatar Apr 26 '24 13:04 mansenfranzen

@mansenfranzen

I've put up a pull request to add @azmeuk! :tada:

allcontributors[bot] avatar Apr 26 '24 13:04 allcontributors[bot]