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
Describe the bug
The model.__doc__ value we use to inject docstring information into the frontend, where it can be accessed via hover tooltips, is only useful for classes which actually have a docstring. For classes which don't, __doc__ seems to fall back onto the class definition.*
Additionally, the resulting <abbr> HTML tags seem to mess with whitespace: the class name may be preceded by a newline, though I'm not entirely sure if that is to do with the formatting and/or length of the docstring contents (which go into the "title" attribute of the <abbr> tag) or the way the tag is included (via templatetags).
Example:
Looking at the classes in the "Relations" menu, I see this issue with the "Property" class but not with "Triple" (neither of which currently has a docstring).
Screenshot:
*A cursory look at the Python docs suggests__doc__ is supposed to default to None when there is no docstring. The behaviour I'm seeing, however, mirrors that ofinspect.getdoc().
The text was updated successfully, but these errors were encountered:
koeaw
added
bug
Something isn't working (properly, as expected, at all)
UI-UX
Appearance, coherence, usability of user-facing parts (frontend, user interface)
labels
Dec 7, 2023
koeaw
linked a pull request
Dec 7, 2023
that will
close
this issue
Describe the bug
The
model.__doc__
value we use to inject docstring information into the frontend, where it can be accessed via hover tooltips, is only useful for classes which actually have a docstring. For classes which don't,__doc__
seems to fall back onto the class definition.*Additionally, the resulting
<abbr>
HTML tags seem to mess with whitespace: the class name may be preceded by a newline, though I'm not entirely sure if that is to do with the formatting and/or length of the docstring contents (which go into the"title"
attribute of the<abbr>
tag) or the way the tag is included (via templatetags).Example:
Looking at the classes in the "Relations" menu, I see this issue with the "Property" class but not with "Triple" (neither of which currently has a docstring).
Screenshot:
*A cursory look at the Python docs suggests
__doc__
is supposed to default toNone
when there is no docstring. The behaviour I'm seeing, however, mirrors that ofinspect.getdoc()
.The text was updated successfully, but these errors were encountered: