From 60cbcec3990dd7437f547bdb2b85eb95b0457300 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Saugat=20Pachhai=20=28=E0=A4=B8=E0=A5=8C=E0=A4=97=E0=A4=BE?= =?UTF-8?q?=E0=A4=A4=29?= Date: Mon, 23 May 2022 15:46:26 +0545 Subject: [PATCH] formatting: consider dvc-render as a known first party for ordering imports --- dvc/commands/plots.py | 3 +-- dvc/render/match.py | 1 + dvc/repo/plots/__init__.py | 3 +-- pyproject.toml | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/dvc/commands/plots.py b/dvc/commands/plots.py index 7a26f3c0e..10dfb901f 100644 --- a/dvc/commands/plots.py +++ b/dvc/commands/plots.py @@ -38,9 +38,8 @@ class CmdPlots(CmdBase): def run(self): from pathlib import Path - from dvc_render import render_html - from dvc.render.match import match_renderers + from dvc_render import render_html if self.args.show_vega: if not self.args.targets: diff --git a/dvc/render/match.py b/dvc/render/match.py index 5a95c0c0c..46feeed6c 100644 --- a/dvc/render/match.py +++ b/dvc/render/match.py @@ -1,6 +1,7 @@ from typing import TYPE_CHECKING, Dict, List, Optional import dpath.util + from dvc_render import RENDERERS from .convert import to_datapoints diff --git a/dvc/repo/plots/__init__.py b/dvc/repo/plots/__init__.py index f3f557f92..d8af7fddc 100644 --- a/dvc/repo/plots/__init__.py +++ b/dvc/repo/plots/__init__.py @@ -196,9 +196,8 @@ class Plots: out.plot.pop(prop) def modify(self, path, props=None, unset=None): - from dvc_render.vega_templates import get_template - from dvc.dvcfile import Dvcfile + from dvc_render.vega_templates import get_template props = props or {} template = props.get("template") diff --git a/pyproject.toml b/pyproject.toml index dfe0de9f4..335e73c5a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,7 +25,7 @@ exclude = ''' [tool.isort] profile = "black" -known_first_party = ["dvc", "dvc_data", "dvc_objects", "tests"] +known_first_party = ["dvc", "dvc_data", "dvc_objects", "dvc_render", "tests"] line_length = 79 [tool.pytest.ini_options]