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)
| 236 | |
| 237 | |
| 238 | def 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 | |
| 260 | def getcallargs(*func_and_positional, **named): |
no test coverage detected