MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / _missing_arguments

Function _missing_arguments

tools/python-3.11.9-amd64/Lib/inspect.py:1481–1495  ·  view source on GitHub ↗
(f_name, argnames, pos, values)

Source from the content-addressed store, hash-verified

1479 return '(' + ', '.join(specs) + ')'
1480
1481def _missing_arguments(f_name, argnames, pos, values):
1482 names = [repr(name) for name in argnames if name not in values]
1483 missing = len(names)
1484 if missing == 1:
1485 s = names[0]
1486 elif missing == 2:
1487 s = "{} and {}".format(*names)
1488 else:
1489 tail = ", {} and {}".format(*names[-2:])
1490 del names[-2:]
1491 s = ", ".join(names) + tail
1492 raise TypeError("%s() missing %i required %s argument%s: %s" %
1493 (f_name, missing,
1494 "positional" if pos else "keyword-only",
1495 "" if missing == 1 else "s", s))
1496
1497def _too_many(f_name, args, kwonly, varargs, defcount, given, values):
1498 atleast = len(args) - defcount

Callers 1

getcallargsFunction · 0.85

Calls 2

formatMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected