MCPcopy Index your code
hub / github.com/python/cpython / signature

Method signature

Lib/test/test_inspect/test_inspect.py:3084–3093  ·  view source on GitHub ↗
(func, **kw)

Source from the content-addressed store, hash-verified

3082class TestSignatureObject(unittest.TestCase):
3083 @staticmethod
3084 def signature(func, **kw):
3085 sig = inspect.signature(func, **kw)
3086 return (tuple((param.name,
3087 (... if param.default is param.empty else param.default),
3088 (... if param.annotation is param.empty
3089 else param.annotation),
3090 str(param.kind).lower())
3091 for param in sig.parameters.values()),
3092 (... if sig.return_annotation is sig.empty
3093 else sig.return_annotation))
3094
3095 def test_signature_object(self):
3096 S = inspect.Signature

Calls 3

strFunction · 0.85
lowerMethod · 0.45
valuesMethod · 0.45

Tested by

no test coverage detected