mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-04 15:28:27 +01:00
12 lines
334 B
Python
12 lines
334 B
Python
import dpath.util
|
|
|
|
dpath.options.ALLOW_EMPTY_STRING_KEYS = True
|
|
|
|
|
|
def get_plot(plots_data, revision, typ="sources", file=None, endkey="data"):
|
|
if file is not None:
|
|
return dpath.util.get(
|
|
plots_data, [revision, typ, "data", file, endkey]
|
|
)
|
|
return dpath.util.get(plots_data, [revision, typ, endkey])
|