Skip to content

fix deprecation warning in inspect #2088

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 17, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion packages/python/plotly/plotly/express/_doc.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import inspect
from textwrap import TextWrapper

try:
getfullargspec = inspect.getfullargspec
except AttributeError: # python 2
getfullargspec = inspect.getargspec

# TODO contents of columns
# TODO explain categorical
Expand Down Expand Up @@ -505,7 +509,7 @@
def make_docstring(fn, override_dict={}):
tw = TextWrapper(width=75, initial_indent=" ", subsequent_indent=" ")
result = (fn.__doc__ or "") + "\nParameters\n----------\n"
for param in inspect.getargspec(fn)[0]:
for param in getfullargspec(fn)[0]:
if override_dict.get(param):
param_doc = override_dict[param]
else:
Expand Down