MCPcopy Index your code
hub / github.com/pydata/xarray / detect_parameters

Function detect_parameters

xarray/backends/plugins.py:47–62  ·  view source on GitHub ↗
(open_dataset: Callable)

Source from the content-addressed store, hash-verified

45
46
47def detect_parameters(open_dataset: Callable) -> tuple[str, ...]:
48 signature = inspect.signature(open_dataset)
49 parameters = signature.parameters
50 parameters_list = []
51 for name, param in parameters.items():
52 if param.kind in (
53 inspect.Parameter.VAR_KEYWORD,
54 inspect.Parameter.VAR_POSITIONAL,
55 ):
56 raise TypeError(
57 f"All the parameters in {open_dataset!r} signature should be explicit. "
58 "*args and **kwargs is not supported"
59 )
60 if name != "self":
61 parameters_list.append(name)
62 return tuple(parameters_list)
63
64
65def backends_dict_from_pkg(

Callers 1

set_missing_parametersFunction · 0.85

Calls 1

itemsMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…