From e61815bed9501df52620d7667f84106f3db3602e Mon Sep 17 00:00:00 2001 From: Dan Date: Tue, 5 Dec 2023 17:13:46 -0700 Subject: [PATCH] fix unreachable code branches --- data_diff/hashdiff_tables.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data_diff/hashdiff_tables.py b/data_diff/hashdiff_tables.py index b77594cc..531213f4 100644 --- a/data_diff/hashdiff_tables.py +++ b/data_diff/hashdiff_tables.py @@ -92,7 +92,7 @@ def _validate_and_adjust_columns(self, table1: TableSegment, table2: TableSegmen # Update schemas to minimal mutual precision col1 = table1._schema[c1] col2 = table2._schema[c2] - if isinstance(col1, PrecisionType) and isinstance(col2, PrecisionType): + if isinstance(col1, PrecisionType): if strict and not isinstance(col2, PrecisionType): raise TypeError(f"Incompatible types for column '{c1}': {col1} <-> {col2}") @@ -104,7 +104,7 @@ def _validate_and_adjust_columns(self, table1: TableSegment, table2: TableSegmen table1._schema[c1] = attrs.evolve(col1, precision=lowest.precision, rounds=lowest.rounds) table2._schema[c2] = attrs.evolve(col2, precision=lowest.precision, rounds=lowest.rounds) - elif isinstance(col1, (NumericType, Boolean)) and isinstance(col2, (NumericType, Boolean)): + elif isinstance(col1, (NumericType, Boolean)): if strict and not isinstance(col2, (NumericType, Boolean)): raise TypeError(f"Incompatible types for column '{c1}': {col1} <-> {col2}")