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
Out of curiosity, I took a glance through your source code. The problem is quite easy to trace; it comes from here.
return_type = return_type.lstrip("typing.")
What this does is if return type starts with any of the characters in (t, y, p, i, n, g, .) it'll be stripped. E.g:
"tuple".lstrip("typing") --> "uple"
Even more problematic: one of the most basic types, "int" has all 3 characters among (t, y, p, i, n, g, .) and thus gets completely deleted.
"int".lstrip("typing") --> ""
The fix would be to swap out lstrip, which has a potentially dangerous behaviour, with some re expression.
mashrurmorshed
changed the title
Tuple in return type signature showing as "uple".
Tuple in return type signature showing as "uple", because of lstrip.
Jun 8, 2021
Describe the bug:
When the return type is tuple, it is being rendered as "uple" instead.
Expected behaviour:
I expect it to show tuple.
Steps to reproduce the issue:
Lazydoc renders this as:
Note the "uple".
Technical details:
Possible Fix:
Again, seems to be a cosmetic issue like #18
Additional context:
The text was updated successfully, but these errors were encountered: