From 14a02b48cf7a291de4a2b25c71d2bf340f134260 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2024 20:04:37 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.7.2 → v0.8.2](https://github.com/astral-sh/ruff-pre-commit/compare/v0.7.2...v0.8.2) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3e02ee0..344a485 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -19,7 +19,7 @@ repos: - id: sort-simple-yaml - id: trailing-whitespace - repo: https://github.com/astral-sh/ruff-pre-commit - rev: 'v0.7.2' + rev: 'v0.8.2' hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] From ace2ecd1c3cdd3048d0d5f6ebf9c117b7d109bdd Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2024 20:05:02 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/dvc_render/vega_templates.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/dvc_render/vega_templates.py b/src/dvc_render/vega_templates.py index d14fe8e..dfe4a1d 100644 --- a/src/dvc_render/vega_templates.py +++ b/src/dvc_render/vega_templates.py @@ -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