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
Yea, no idea on that last question. If there's a third party lib out there that handles it I'd be +1 to vendoring it, but it's not like that snippet you linked is very long either so we could simply drop it into a util function and tweak as (if) necessary.
It seems that the standard inspect.cleandoc function does exactly what we need. It is used by inspect.getdoc so using that instead of accessing __doc__ directly ought to be enough. One gotcha with getdoc is that it returns None, not an empty string, if an object has no docstring. This is how I remember using it earlier:
doc = inspect.getdoc(obj) or ''
Once we got the RF 2.8.6 release out (hopefully today), I can take a look how to use getdoc in Invoke code base. If the fix is trivial and you know the place where it belongs, I obviously don't have anything against you just doing it yourself.