@@ -1254,18 +1254,20 @@ def getargs(co):
12541254FullArgSpec = namedtuple ('FullArgSpec' ,
12551255 'args, varargs, varkw, defaults, kwonlyargs, kwonlydefaults, annotations' )
12561256
1257- def getfullargspec (func ):
1257+ def getfullargspec (func , * , annotation_format = Format . VALUE ):
12581258 """Get the names and default values of a callable object's parameters.
12591259
1260- A tuple of seven things is returned:
1261- (args, varargs, varkw, defaults, kwonlyargs, kwonlydefaults, annotations).
1260+ A FullArgSpec namedtuple is returned, which has the following attributes:
12621261 'args' is a list of the parameter names.
12631262 'varargs' and 'varkw' are the names of the * and ** parameters or None.
12641263 'defaults' is an n-tuple of the default values of the last n parameters.
12651264 'kwonlyargs' is a list of keyword-only parameter names.
12661265 'kwonlydefaults' is a dictionary mapping names from kwonlyargs to defaults.
12671266 'annotations' is a dictionary mapping parameter names to annotations.
12681267
1268+ The *annotation_format* parameter controls the format of the annotations.
1269+ See the annotationlib documentation for details.
1270+
12691271 Notable differences from inspect.signature():
12701272 - the "self" parameter is always reported, even for bound methods
12711273 - wrapper chains defined by __wrapped__ *not* unwrapped automatically
@@ -1291,7 +1293,8 @@ def getfullargspec(func):
12911293 follow_wrapper_chains = False ,
12921294 skip_bound_arg = False ,
12931295 sigcls = Signature ,
1294- eval_str = False )
1296+ eval_str = False ,
1297+ annotation_format = annotation_format )
12951298 except Exception as ex :
12961299 # Most of the times 'signature' will raise ValueError.
12971300 # But, it can also raise AttributeError, and, maybe something
0 commit comments