MCPcopy Index your code
hub / github.com/secdev/scapy / _args

Method _args

scapy/utils.py:3734–3753  ·  view source on GitHub ↗
(func: Any)

Source from the content-addressed store, hash-verified

3732 Return the help related to this CLI util
3733 """
3734 def _args(func: Any) -> str:
3735 flags = func._flags.copy()
3736 if func.__name__ in self.commands_output:
3737 flags += self.commands_output[func.__name__]._flags # type: ignore
3738 return " %s%s" % (
3739 (
3740 "%s " % " ".join("[%s]" % x for x in flags)
3741 if flags else ""
3742 ),
3743 " ".join(
3744 "<%s%s>" % (
3745 x.name,
3746 "?" if
3747 (x.default is None or x.default != inspect.Parameter.empty)
3748 else ""
3749 )
3750 for x in list(inspect.signature(func).parameters.values())[1:]
3751 if x.name not in func._flagnames and x.name[0] != "_"
3752 )
3753 )
3754
3755 if cmd:
3756 if cmd not in self.commands:

Callers

nothing calls this directly

Calls 3

joinMethod · 0.80
copyMethod · 0.45
valuesMethod · 0.45

Tested by

no test coverage detected