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

Function sort_backends

xarray/backends/plugins.py:90–100  ·  view source on GitHub ↗
(
    backend_entrypoints: dict[str, type[BackendEntrypoint]],
)

Source from the content-addressed store, hash-verified

88
89
90def sort_backends(
91 backend_entrypoints: dict[str, type[BackendEntrypoint]],
92) -> dict[str, type[BackendEntrypoint]]:
93 ordered_backends_entrypoints: dict[str, type[BackendEntrypoint]] = {}
94 for be_name in OPTIONS["netcdf_engine_order"]:
95 if backend_entrypoints.get(be_name) is not None:
96 ordered_backends_entrypoints[be_name] = backend_entrypoints.pop(be_name)
97 ordered_backends_entrypoints.update(
98 {name: backend_entrypoints[name] for name in sorted(backend_entrypoints)}
99 )
100 return ordered_backends_entrypoints
101
102
103def build_engines(entrypoints: EntryPoints) -> dict[str, BackendEntrypoint]:

Callers 1

build_enginesFunction · 0.85

Calls 2

getMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…