Skip to content

Commit 4c68a89

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 1e1531e commit 4c68a89

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/dvc_render/vega_templates.py

+2-5
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,8 @@ class Template:
8686
def __init__(
8787
self, content: Optional[dict[str, Any]] = None, name: Optional[str] = None
8888
):
89-
if (
90-
content
91-
and not isinstance(content, dict)
92-
or self.DEFAULT_CONTENT
93-
and not isinstance(self.DEFAULT_CONTENT, dict)
89+
if (content and not isinstance(content, dict)) or (
90+
self.DEFAULT_CONTENT and not isinstance(self.DEFAULT_CONTENT, dict)
9491
):
9592
raise BadTemplateError
9693
self._original_content = content or self.DEFAULT_CONTENT

tests/test_vega.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ def test_fill_anchor_in_string(tmp_path):
235235
"transform": [
236236
{"joinaggregate": [{"op": "mean", "field": "lab", "as": "mean_y"}]},
237237
{
238-
"calculate": "pow(datum.<DVC_METRIC_Y> - " "datum.<DVC_METRIC_X>,2)",
238+
"calculate": "pow(datum.<DVC_METRIC_Y> - datum.<DVC_METRIC_X>,2)",
239239
"as": "SR",
240240
},
241241
{"joinaggregate": [{"op": "sum", "field": "SR", "as": "SSR"}]},

0 commit comments

Comments
 (0)