Move ArgSpec declaration to module level
@@ -21,12 +21,13 @@ from collections import namedtuple
from six import PY2
+ArgSpec = namedtuple('ArgSpec', 'args varargs keywords defaults')
+
+
def getargspec(func):
if PY2:
return inspect.getargspec(func)
- ArgSpec = namedtuple('ArgSpec', 'args varargs keywords defaults')
-
sig = inspect.signature(func)
args = [
p.name for p in sig.parameters.values()
