Skip to content

Commit

Permalink
Remove walrus operator for Python 3.7 compatiblity (apache#18205)
Browse files Browse the repository at this point in the history
  • Loading branch information
ad-m authored and bwang221 committed Feb 10, 2022
1 parent c9cfb99 commit 317cc13
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/example_data/data_loading/pandas/pandas_data_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 317cc13

Please sign in to comment.