diff --git a/tests/example_data/data_loading/pandas/pandas_data_loader.py b/tests/example_data/data_loading/pandas/pandas_data_loader.py index 8f50bdbb6ce91..d5d90d6934287 100644 --- a/tests/example_data/data_loading/pandas/pandas_data_loader.py +++ b/tests/example_data/data_loading/pandas/pandas_data_loader.py @@ -74,8 +74,10 @@ def _detect_schema_name(self) -> Optional[str]: return inspect(self._db_engine).default_schema_name def _take_data_types(self, table: Table) -> Optional[Dict[str, str]]: - if metadata_table := table.table_metadata: - if types := metadata_table.types: + metadata_table = table.table_metadata + if metadata_table: + types = metadata_table.types + if types: return types return None