mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
plots: small refactorings (#9206)
This commit is contained in:
@@ -245,7 +245,7 @@ class VegaConverter(Converter):
|
||||
for i, (y_file, y_field) in enumerate(ys):
|
||||
if num_xs > 1:
|
||||
x_file, x_field = xs[i]
|
||||
datapoints = [d.copy() for d in file2datapoints.get(y_file, [])]
|
||||
datapoints = [{**d} for d in file2datapoints.get(y_file, [])]
|
||||
|
||||
if props_update.get("y", None) == "dvc_inferred_y_value":
|
||||
_update_from_field(
|
||||
|
||||
@@ -157,9 +157,7 @@ class Plots:
|
||||
props: Optional[Dict] = None,
|
||||
onerror: Optional[Callable] = None,
|
||||
):
|
||||
from dvc.fs.dvc import DVCFileSystem
|
||||
|
||||
fs = DVCFileSystem(repo=self.repo)
|
||||
fs = self.repo.dvcfs
|
||||
|
||||
props = props or {}
|
||||
|
||||
@@ -506,10 +504,7 @@ def _collect_definitions(
|
||||
result: Dict = defaultdict(dict)
|
||||
props = props or {}
|
||||
|
||||
from dvc.fs.dvc import DVCFileSystem
|
||||
|
||||
fs = DVCFileSystem(repo=repo)
|
||||
|
||||
fs = repo.dvcfs
|
||||
dpath.merge(
|
||||
result,
|
||||
_collect_pipeline_files(repo, targets, props, onerror=onerror),
|
||||
|
||||
Reference in New Issue
Block a user