MCPcopy Index your code
hub / github.com/ipython/ipython / _getdef

Method _getdef

IPython/core/oinspect.py:419–429  ·  view source on GitHub ↗

Return the call signature for any callable object. If any exception is generated, None is returned instead and the exception is suppressed.

(self,obj,oname='')

Source from the content-addressed store, hash-verified

417 return self.parser.format(*args, **kwargs)
418
419 def _getdef(self,obj,oname='') -> Union[str,None]:
420 """Return the call signature for any callable object.
421
422 If any exception is generated, None is returned instead and the
423 exception is suppressed."""
424 if not callable(obj):
425 return None
426 try:
427 return _render_signature(signature(obj), oname)
428 except Exception:
429 return None
430
431 def __head(self, h: str) -> str:
432 """Return a header string with proper colors."""

Callers 2

pdefMethod · 0.95
infoMethod · 0.95

Calls 1

_render_signatureFunction · 0.85

Tested by

no test coverage detected