From fb72826e649e9a0e264a4f5ab39841ab4e0e677c Mon Sep 17 00:00:00 2001 From: danphenderson Date: Wed, 21 Feb 2024 13:05:49 -0800 Subject: [PATCH 1/3] chore: ignore pipenv artifacts --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index 1e8ff7411..9903aaf88 100644 --- a/.gitignore +++ b/.gitignore @@ -34,6 +34,10 @@ test.env # pycharm .idea/ +# Pipenv +Pipfile.lock +Pipfile + # MacOS .DS_Store From 495692f4fe5e249538156016d34cbda0488266c2 Mon Sep 17 00:00:00 2001 From: danphenderson Date: Wed, 21 Feb 2024 13:07:16 -0800 Subject: [PATCH 2/3] chore: cleanup irrelevant flake8 exclude statement --- .flake8 | 1 - 1 file changed, 1 deletion(-) diff --git a/.flake8 b/.flake8 index bbc3202a0..8a46e2986 100644 --- a/.flake8 +++ b/.flake8 @@ -11,4 +11,3 @@ ignore = E203, E741, E501, -exclude = test From d7d8caa7ce88b7be18292a1ef1dae0b569b465dd Mon Sep 17 00:00:00 2001 From: danphenderson Date: Wed, 21 Feb 2024 13:16:09 -0800 Subject: [PATCH 3/3] fix: flake8 code smells --- .flake8 | 1 + dbt/adapters/spark/impl.py | 2 +- tests/unit/utils.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.flake8 b/.flake8 index 8a46e2986..a326fcf32 100644 --- a/.flake8 +++ b/.flake8 @@ -11,3 +11,4 @@ ignore = E203, E741, E501, + E231, diff --git a/dbt/adapters/spark/impl.py b/dbt/adapters/spark/impl.py index 9a1a7ec06..342a23dc3 100644 --- a/dbt/adapters/spark/impl.py +++ b/dbt/adapters/spark/impl.py @@ -236,7 +236,7 @@ def list_relations_without_caching(self, schema_relation: BaseRelation) -> List[ ) except DbtRuntimeError as e: errmsg = getattr(e, "msg", "") - if f"Database '{schema_relation}' not found" in errmsg: + if f"Database '{schema_relation}' not found" in errmsg: # noqa: E713 return [] # Iceberg compute engine behavior: show table elif "SHOW TABLE EXTENDED is not supported for v2 tables" in errmsg: diff --git a/tests/unit/utils.py b/tests/unit/utils.py index 17cd3ee78..db23d2c53 100644 --- a/tests/unit/utils.py +++ b/tests/unit/utils.py @@ -239,7 +239,7 @@ def generate_name_macros(package): else: source = f"target.{component}" name = f"generate_{component}_name" - sql = f"{{% macro {name}(value, node) %}} {{% if value %}} {{{{ value }}}} {{% else %}} {{{{ {source} }}}} {{% endif %}} {{% endmacro %}}" + sql = f"{{% macro {name}(value, node) %}} {{% if value %}} {{{{ value }}}} {{% else %}} {{{{ {source} }}}} {{% endif %}} {{% endmacro %}}" # noqa: E201, E202 name_sql[name] = sql for name, sql in name_sql.items():