File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
packages/python/plotly/plotly/express Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change 11import inspect
2+ from textwrap import fill , indent
23
34
45colref = ("str or int or Series or array-like" ,
406407
407408def make_docstring (fn ):
408409 result = (fn .__doc__ or "" ) + "\n Parameters\n ----------\n "
409- for arg in inspect .getargspec (fn )[0 ]:
410- d = (
411- " " .join (docs [arg ] or "" )
412- if arg in docs
413- else "(documentation missing from map)"
414- )
415- result += " %s: %s\n " % (arg , d )
416- result += "Returns:\n "
410+ for param in inspect .getargspec (fn )[0 ]:
411+ param_desc_list = docs [param ][1 :]
412+ param_desc = (indent (fill (" " .join (param_desc_list or "" )), ' ' )
413+ if param in docs
414+ else "(documentation missing from map)" )
415+ param_type = docs [param ][0 ]
416+ result += "%s: %s\n %s\n " % (param , param_type , param_desc )
417417 result += "\n Returns\n -------\n "
418418 result += " A `Figure` object."
419419 return result
You can’t perform that action at this time.
0 commit comments