MCPcopy Create free account
hub / github.com/ipython/ipython / _getdef

Method _getdef

IPython/core/oinspect.py:368–376  ·  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

366 self.set_active_scheme(scheme)
367
368 def _getdef(self,obj,oname='') -> Union[str,None]:
369 """Return the call signature for any callable object.
370
371 If any exception is generated, None is returned instead and the
372 exception is suppressed."""
373 try:
374 return _render_signature(signature(obj), oname)
375 except:
376 return None
377
378 def __head(self,h) -> str:
379 """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