Update introspect.py

Adds a check to determine if getfullargspec should be used. This is added in Py3 to get elements like type annotations.
This commit is contained in:
Mesalu
2018-07-25 13:52:29 -07:00
committed by GitHub
parent 03e6abf33e
commit 0f1861990d

View File

@@ -175,7 +175,7 @@ def getCallTip(command='', locals=None):
pass
elif inspect.isfunction(obj):
# tip1 is a string like: "getCallTip(command='', locals=None)"
argspec = inspect.getargspec(obj)
argspec = inspect.getargspec(obj) if not PY3 else inspect.getfullargspec(obj)
argspec = inspect.formatargspec(*argspec)
if dropSelf:
# The first parameter to a method is a reference to an