Skip to content

Commit

Permalink
Remove walrus operator for Python 3.7 compatiblity (#18205)
Browse files Browse the repository at this point in the history
  • Loading branch information
ad-m committed Jan 28, 2022
1 parent ea2d668 commit 84db896
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 84db896

Please sign in to comment.