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

Method func

scapy/utils.py:3685–3692  ·  view source on GitHub ↗
(cmd: DecoratorCallable)

Source from the content-addressed store, hash-verified

3683 Decorator to register a command
3684 """
3685 def func(cmd: DecoratorCallable) -> DecoratorCallable:
3686 cmd.cliutil_type = _CLIUtilMetaclass.TYPE.COMMAND # type: ignore
3687 cmd._spaces = spaces # type: ignore
3688 cmd._globsupport = globsupport # type: ignore
3689 cls._inspectkwargs(cmd)
3690 if cmd._globsupport and not cmd._spaces: # type: ignore
3691 raise ValueError("Cannot use globsupport without spaces.")
3692 return cmd
3693 return func
3694
3695 @classmethod

Callers 1

runMethod · 0.45

Calls 1

_inspectkwargsMethod · 0.80

Tested by

no test coverage detected