MCPcopy
hub / github.com/dask/dask / _get_paths

Function _get_paths

dask/config.py:21–39  ·  view source on GitHub ↗

Get locations to search for YAML configuration files. This logic exists as a separate function for testing purposes.

()

Source from the content-addressed store, hash-verified

19
20
21def _get_paths():
22 """Get locations to search for YAML configuration files.
23
24 This logic exists as a separate function for testing purposes.
25 """
26
27 paths = [
28 os.getenv("DASK_ROOT_CONFIG", "/etc/dask"),
29 os.path.join(sys.prefix, "etc", "dask"),
30 *[os.path.join(prefix, "etc", "dask") for prefix in site.PREFIXES],
31 os.path.join(os.path.expanduser("~"), ".config", "dask"),
32 ]
33 if "DASK_CONFIG" in os.environ:
34 paths.append(os.environ["DASK_CONFIG"])
35
36 # Remove duplicate paths while preserving ordering
37 paths = list(reversed(list(dict.fromkeys(reversed(paths)))))
38
39 return paths
40
41
42paths = _get_paths()

Callers 3

test__get_pathsFunction · 0.90
config.pyFile · 0.85

Calls 1

joinMethod · 0.45

Tested by 2

test__get_pathsFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…