MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / getfullargspec

Function getfullargspec

tensorflow/python/util/tf_inspect.py:238–257  ·  view source on GitHub ↗

TFDecorator-aware replacement for `inspect.getfullargspec`. This wrapper emulates `inspect.getfullargspec` in[^)]* Python2. Args: obj: A callable, possibly decorated. Returns: The `FullArgSpec` that describes the signature of the outermost decorator that changes the callable's s

(obj)

Source from the content-addressed store, hash-verified

236
237
238def getfullargspec(obj):
239 """TFDecorator-aware replacement for `inspect.getfullargspec`.
240
241 This wrapper emulates `inspect.getfullargspec` in[^)]* Python2.
242
243 Args:
244 obj: A callable, possibly decorated.
245
246 Returns:
247 The `FullArgSpec` that describes the signature of
248 the outermost decorator that changes the callable's signature. If the
249 callable is not decorated, `inspect.getfullargspec()` will be called
250 directly on the callable.
251 """
252 decorators, target = tf_decorator.unwrap(obj)
253
254 for d in decorators:
255 if d.decorator_argspec is not None:
256 return _convert_maybe_argspec_to_fullargspec(d.decorator_argspec)
257 return _getfullargspec(target)
258
259
260def getcallargs(*func_and_positional, **named):

Callers 2

_getargspecFunction · 0.85
getcallargsFunction · 0.85

Calls 3

_getfullargspecFunction · 0.85
unwrapMethod · 0.80

Tested by

no test coverage detected