From ea23a2e501a8db58b07907899383d3ce3e49faa3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Zuzek?= Date: Wed, 4 Oct 2023 17:20:00 +0200 Subject: [PATCH] fix type mismatch on assignment --- pandas/io/excel/_odfreader.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandas/io/excel/_odfreader.py b/pandas/io/excel/_odfreader.py index 93bea0f5a473e..05f5ee5951c6c 100644 --- a/pandas/io/excel/_odfreader.py +++ b/pandas/io/excel/_odfreader.py @@ -222,9 +222,9 @@ def _get_cell_value(self, cell) -> Scalar | NaTType: cell_value = cell.attributes.get((OFFICENS, "date-value")) return pd.Timestamp(cell_value) elif cell_type == "time": - cell_value = self._get_cell_time_value(cell) + stamp = self._get_cell_time_value(cell) # cast needed here because Scalar doesn't include datetime.time - return cast(Scalar, cell_value) + return cast(Scalar, stamp) else: self.close() raise ValueError(f"Unrecognized type {cell_type}")