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

Function _extra_args

dask/_task_spec.py:1196–1209  ·  view source on GitHub ↗
(typ: type)

Source from the content-addressed store, hash-verified

1194
1195@functools.cache
1196def _extra_args(typ: type) -> set[str]:
1197 import inspect
1198
1199 sig = inspect.signature(typ)
1200 extras = set()
1201 for name, param in sig.parameters.items():
1202 if param.kind in (
1203 inspect.Parameter.VAR_POSITIONAL,
1204 inspect.Parameter.VAR_KEYWORD,
1205 ):
1206 continue
1207 if name in typ.get_all_slots(): # type: ignore
1208 extras.add(name)
1209 return extras

Callers 1

substituteMethod · 0.85

Calls 4

setClass · 0.85
get_all_slotsMethod · 0.80
itemsMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected