[Sqlalchemy-tickets] Issue #3653: Support docstrings on hybrid attributes (zzzeek/sqlalchemy)
Brought to you by:
zzzeek
From: David B. <iss...@bi...> - 2016-02-18 17:31:22
|
New issue 3653: Support docstrings on hybrid attributes https://bitbucket.org/zzzeek/sqlalchemy/issues/3653/support-docstrings-on-hybrid-attributes David Baumgold: Currently, it appears that there is no way to set a docstring on a hybrid attribute: even if there is a docstring on the function, the `@hybrid_property` and `@hybrid_method` decorators don't copy it over to the objects they return. There should be way to set docstrings on hybrid attributes. My ultimate goal is to get [Sphinx's](http://www.sphinx-doc.org/) [autodoc](http://www.sphinx-doc.org/en/stable/ext/autodoc.html) extension working properly with hybrid attributes, so that I can write RST-formatted docstrings for the hybrid attributes of my data models, and generate beautiful documentation from those docstrings. I started putting together a fix for this bug in [a GitHub pull request](https://github.com/zzzeek/sqlalchemy/pull/238), but the problem turned out to be more complicated than I expected. |