You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey!
Really a fan of this library (and many other of your libraries too), so thank you for the work you put in first of all.
I wonder if it would be possible to support attribute docstrings for dataclasses for the description?
I think it needs parsing the AST, but I think it shouldnt be too complicated. Some code to show a POC:
Not sure how robust this approach is, perhaps its worth it to check how pydantic for example does it (when use_attribute_docstrings is set to True),
but for me, this would be a very helpful addition.
Cheers and thank you!
The text was updated successfully, but these errors were encountered:
Yeah, attribute docstrings has been coming up recently at griffe-fieldz as well: pyapp-kit/griffe-fieldz#17
is your use case outside of generating documentation? I'd kind of like to avoid AST parsing if we can avoid it, but i agree it shouldn't be terribly hard (and I can look at how pydantic does it)
Yes, I also have use cases outside of documentation. Would be cool if it could get added, but otherwise it´s not a big deal if you follow a no-AST policy here, I would just wrap your library then and special-case dataclasses.
Hey!
Really a fan of this library (and many other of your libraries too), so thank you for the work you put in first of all.
I wonder if it would be possible to support attribute docstrings for dataclasses for the description?
I think it needs parsing the AST, but I think it shouldnt be too complicated. Some code to show a POC:
Not sure how robust this approach is, perhaps its worth it to check how pydantic for example does it (when use_attribute_docstrings is set to True),
but for me, this would be a very helpful addition.
Cheers and thank you!
The text was updated successfully, but these errors were encountered: