MCPcopy Create free account
hub / github.com/dask/dask / get_named_args

Function get_named_args

dask/utils.py:699–706  ·  view source on GitHub ↗

Get all non ``*args/**kwargs`` arguments for a function

(func)

Source from the content-addressed store, hash-verified

697
698
699def get_named_args(func) -> list[str]:
700 """Get all non ``*args/**kwargs`` arguments for a function"""
701 s = inspect.signature(func)
702 return [
703 n
704 for n, p in s.parameters.items()
705 if p.kind in [p.POSITIONAL_OR_KEYWORD, p.POSITIONAL_ONLY, p.KEYWORD_ONLY]
706 ]
707
708
709class Dispatch:

Callers 2

_derived_fromFunction · 0.85

Calls 1

itemsMethod · 0.45

Tested by

no test coverage detected