Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow autodoc_pydantic_field_signature_prefix to be empty #188

Closed
azmeuk opened this issue Dec 8, 2023 · 5 comments
Closed

Allow autodoc_pydantic_field_signature_prefix to be empty #188

azmeuk opened this issue Dec 8, 2023 · 5 comments
Labels
enhancement New feature or request
Milestone

Comments

@azmeuk
Copy link

azmeuk commented Dec 8, 2023

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?

@mansenfranzen mansenfranzen added the enhancement New feature or request label Dec 27, 2023
@mansenfranzen
Copy link
Owner

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 mansenfranzen added this to the v2.2 milestone Dec 27, 2023
@mansenfranzen
Copy link
Owner

@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/autodoc_pydantic.git@v2.2.0-a.2 and rebuild your docs.

Please reopen if any issues persist.

@mansenfranzen
Copy link
Owner

@all-contributors please add @azmeuk for bug

Copy link
Contributor

@mansenfranzen

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

@azmeuk
Copy link
Author

azmeuk commented May 17, 2024

@mansenfranzen Sorry for the long silence.
I just tested and it renders exactly as I wished 👌
Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants