MCPcopy
hub / github.com/dask/dask / config_find

Function config_find

dask/cli.py:77–90  ·  view source on GitHub ↗

Find a Dask config key by searching config location paths

(key)

Source from the content-addressed store, hash-verified

75@config.command(name="find")
76@click.argument("key", required=True)
77def config_find(key):
78 """Find a Dask config key by searching config location paths"""
79 paths = list(dask.config.paths_containing_key(key))
80 if paths:
81 click.echo(f"Found [{key}] in the following files:")
82 max_len = len(str(max(paths, key=lambda v: len(str(v)))))
83 for path in paths:
84 config = next(dask.config.collect_yaml([path]))
85 value = dask.config.get(key, config=config)
86 spacing = " " * (max_len - len(str(path)))
87 click.echo(f"{path} {spacing} [{key}={value}]")
88 else:
89 click.echo(f"Unable to find [{key}] in any of the following paths:")
90 click.echo("\n".join(map(str, dask.config.paths)))
91
92
93@config.command(name="set")

Callers

nothing calls this directly

Calls 3

maxFunction · 0.85
getMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…