Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 13, 2025
1 parent 51eb57a commit d7a42cf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions src/dvc_render/vega_templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,8 @@ class Template:
def __init__(
self, content: Optional[dict[str, Any]] = None, name: Optional[str] = None
):
if (
content
and not isinstance(content, dict)
or self.DEFAULT_CONTENT
and not isinstance(self.DEFAULT_CONTENT, dict)
if (content and not isinstance(content, dict)) or (
self.DEFAULT_CONTENT and not isinstance(self.DEFAULT_CONTENT, dict)
):
raise BadTemplateError
self._original_content = content or self.DEFAULT_CONTENT
Expand Down
2 changes: 1 addition & 1 deletion tests/test_vega.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ def test_fill_anchor_in_string(tmp_path):
"transform": [
{"joinaggregate": [{"op": "mean", "field": "lab", "as": "mean_y"}]},
{
"calculate": "pow(datum.<DVC_METRIC_Y> - " "datum.<DVC_METRIC_X>,2)",
"calculate": "pow(datum.<DVC_METRIC_Y> - datum.<DVC_METRIC_X>,2)",
"as": "SR",
},
{"joinaggregate": [{"op": "sum", "field": "SR", "as": "SSR"}]},
Expand Down

0 comments on commit d7a42cf

Please sign in to comment.