MCPcopy Create free account
hub / github.com/python/cpython / _format_call_signature

Function _format_call_signature

Lib/unittest/mock.py:2542–2556  ·  view source on GitHub ↗
(name, args, kwargs)

Source from the content-addressed store, hash-verified

2540
2541
2542def _format_call_signature(name, args, kwargs):
2543 message = '%s(%%s)' % name
2544 formatted_args = ''
2545 args_string = ', '.join([repr(arg) for arg in args])
2546 kwargs_string = ', '.join([
2547 '%s=%r' % (key, value) for key, value in kwargs.items()
2548 ])
2549 if args_string:
2550 formatted_args = args_string
2551 if kwargs_string:
2552 if formatted_args:
2553 formatted_args += ', '
2554 formatted_args += kwargs_string
2555
2556 return message % formatted_args
2557
2558
2559

Callers 2

__repr__Method · 0.85

Calls 2

joinMethod · 0.45
itemsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…