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

Method _inspectkwargs

scapy/utils.py:3626–3638  ·  view source on GitHub ↗

Internal function to parse arguments from the kwargs of the functions

(func: DecoratorCallable)

Source from the content-addressed store, hash-verified

3624
3625 @staticmethod
3626 def _inspectkwargs(func: DecoratorCallable) -> None:
3627 """
3628 Internal function to parse arguments from the kwargs of the functions
3629 """
3630 func._flagnames = [ # type: ignore
3631 x.name for x in
3632 inspect.signature(func).parameters.values()
3633 if x.kind == inspect.Parameter.KEYWORD_ONLY
3634 ]
3635 func._flags = [ # type: ignore
3636 ("-%s" % x) if len(x) == 1 else ("--%s" % x)
3637 for x in func._flagnames # type: ignore
3638 ]
3639
3640 @staticmethod
3641 def _parsekwargs(

Callers 1

funcMethod · 0.80

Calls 1

valuesMethod · 0.45

Tested by

no test coverage detected