From 61c327466bc0e913137e4d6b9e65bac29b225e28 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 18 Dec 2024 18:15:40 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .../expectations/metrics/util.py | 6 ++--- ...expect_column_values_to_be_in_type_list.py | 22 +++++-------------- 2 files changed, 9 insertions(+), 19 deletions(-) diff --git a/great_expectations/expectations/metrics/util.py b/great_expectations/expectations/metrics/util.py index 03299c22f05b..37d49dfad490 100644 --- a/great_expectations/expectations/metrics/util.py +++ b/great_expectations/expectations/metrics/util.py @@ -421,9 +421,9 @@ def get_sqlalchemy_column_metadata( # noqa: C901 column["type"] = column["type"].compile(dialect=execution_engine.dialect) if dialect_name == GXSqlDialect.SNOWFLAKE: return [ - # TODO: SmartColumn should know the dialect and do lookups based on that - CaseInsensitiveNameDict(column) - for column in columns_copy + # TODO: SmartColumn should know the dialect and do lookups based on that + CaseInsensitiveNameDict(column) + for column in columns_copy ] return columns_copy return columns diff --git a/tests/integration/data_sources_and_expectations/expectations/test_expect_column_values_to_be_in_type_list.py b/tests/integration/data_sources_and_expectations/expectations/test_expect_column_values_to_be_in_type_list.py index def310226ad9..5b5f8c8f42da 100644 --- a/tests/integration/data_sources_and_expectations/expectations/test_expect_column_values_to_be_in_type_list.py +++ b/tests/integration/data_sources_and_expectations/expectations/test_expect_column_values_to_be_in_type_list.py @@ -388,21 +388,15 @@ def test_success_complete_snowflake( "expectation", [ pytest.param( - gxe.ExpectColumnValuesToBeInTypeList( - column="CHAR", type_list=["CHAR", "CHAR(1)"] - ), + gxe.ExpectColumnValuesToBeInTypeList(column="CHAR", type_list=["CHAR", "CHAR(1)"]), id="CHAR", ), pytest.param( - gxe.ExpectColumnValuesToBeInTypeList( - column="TEXT", type_list=["TEXT"] - ), + gxe.ExpectColumnValuesToBeInTypeList(column="TEXT", type_list=["TEXT"]), id="TEXT", ), pytest.param( - gxe.ExpectColumnValuesToBeInTypeList( - column="INTEGER", type_list=["INTEGER"] - ), + gxe.ExpectColumnValuesToBeInTypeList(column="INTEGER", type_list=["INTEGER"]), id="INTEGER", ), pytest.param( @@ -420,9 +414,7 @@ def test_success_complete_snowflake( id="TIMESTAMP", ), pytest.param( - gxe.ExpectColumnValuesToBeInTypeList( - column="DATE", type_list=["DATE"] - ), + gxe.ExpectColumnValuesToBeInTypeList(column="DATE", type_list=["DATE"]), id="DATE", ), pytest.param( @@ -432,9 +424,7 @@ def test_success_complete_snowflake( id="DOUBLE_PRECISION", ), pytest.param( - gxe.ExpectColumnValuesToBeInTypeList( - column="BOOLEAN", type_list=["BOOLEAN"] - ), + gxe.ExpectColumnValuesToBeInTypeList(column="BOOLEAN", type_list=["BOOLEAN"]), id="BOOLEAN", ), pytest.param( @@ -495,4 +485,4 @@ def test_success_complete_postgres( assert isinstance(result_dict, dict) assert isinstance(result_dict["observed_value"], str) assert isinstance(expectation.type_list, list) - assert result_dict["observed_value"] in expectation.type_list \ No newline at end of file + assert result_dict["observed_value"] in expectation.type_list