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
{{ message }}
This repository was archived by the owner on Oct 20, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Oct 20, 2026. It is now read-only.
[BUG] Wrong docstrings for attribute when aliased from another class #141
^ So personally, I was expecting behavior similar to this as the default.
(2.)
Maybe it is possible that @aminalaee disagrees with me, but as far as I am concerned, it is unclear whether the true problem is (A) that pytkdocs doesn't override and obj's .__doc__ when there's a docstring below an attribute, or (B) that python-mkdocstrings, which uses griffe, doesn't have a members attribute (as already mentioned by Amin, griffe resolves the docstring properly whereas pytkdocs does not).
As far as I can tell, implementing a solution to either 1 of the 2 problems above would seem to work for the sqladmin documentation?
Hi, thanks for the report. That's a very good understanding of the current situation. Griffe and the new handler will definitely support members. In the meantime, it's probably possible to fix pytkdocs so that it uses the docstring below an assignment even if the value of the assignment is an object with a __doc__ attribute. This won't be a top priority to me so a PR would be welcome 😄
Activity
[-][BUG] S[/-][+][BUG] Wrong docstrings for attribute when aliased from another class[/+]dwreeves commentedon Mar 24, 2022
Two more bits of additional context.
(1.)
the design pattern of aliasing a class definition as a class variable can be seen in a few projects that use Sphinx docs, such as:
^ So personally, I was expecting behavior similar to this as the default.
(2.)
Maybe it is possible that @aminalaee disagrees with me, but as far as I am concerned, it is unclear whether the true problem is (A) that
pytkdocsdoesn't override and obj's.__doc__when there's a docstring below an attribute, or (B) thatpython-mkdocstrings, which uses griffe, doesn't have amembersattribute (as already mentioned by Amin, griffe resolves the docstring properly whereaspytkdocsdoes not).As far as I can tell, implementing a solution to either 1 of the 2 problems above would seem to work for the sqladmin documentation?
pawamoy commentedon Mar 31, 2022
Hi, thanks for the report. That's a very good understanding of the current situation. Griffe and the new handler will definitely support
members. In the meantime, it's probably possible to fix pytkdocs so that it uses the docstring below an assignment even if the value of the assignment is an object with a__doc__attribute. This won't be a top priority to me so a PR would be welcome 😄pawamoy commentedon Sep 23, 2026
Project is now archived.