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

Function config_get

dask/cli.py:58–71  ·  view source on GitHub ↗

Print config key, or the whole config.

(key=None)

Source from the content-addressed store, hash-verified

56@config.command(name="get")
57@click.argument("key", required=True)
58def config_get(key=None):
59 """Print config key, or the whole config."""
60 try:
61 data = reduce(lambda d, k: d[k], key.split("."), dask.config.config)
62 except (KeyError, TypeError):
63 click.echo(click.style(f"Section not found: {key}", fg="red"), err=True)
64 exit(1)
65
66 if isinstance(data, (list, dict)):
67 click.echo_via_pager(yaml.dump(data))
68 elif data is None:
69 click.echo("None")
70 else:
71 click.echo(data)
72
73
74@config.command(name="find")

Callers

nothing calls this directly

Calls 1

splitMethod · 0.80

Tested by

no test coverage detected