From 04efd91d794796e6d1be5d4f8fcbd96a8ce463b8 Mon Sep 17 00:00:00 2001 From: Eugene M Date: Fri, 13 Dec 2024 16:25:10 -0500 Subject: [PATCH] MNT: typing --- tiled/adapters/parquet.py | 2 +- tiled/adapters/table.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tiled/adapters/parquet.py b/tiled/adapters/parquet.py index b8421396d..d7bf14304 100644 --- a/tiled/adapters/parquet.py +++ b/tiled/adapters/parquet.py @@ -166,5 +166,5 @@ def structure(self) -> TableStructure: """ return self._structure - def get(self, key: str) -> ArrayAdapter | None: + def get(self, key: str) -> Union[ArrayAdapter, None]: return self.dataframe_adapter.get(key) diff --git a/tiled/adapters/table.py b/tiled/adapters/table.py index 8f13461c6..6b7ca2a40 100644 --- a/tiled/adapters/table.py +++ b/tiled/adapters/table.py @@ -169,7 +169,7 @@ def __getitem__(self, key: str) -> ArrayAdapter: # Must compute to determine shape. return ArrayAdapter.from_array(self.read([key])[key].values) - def get(self, key: str) -> ArrayAdapter | None: + def get(self, key: str) -> Union[ArrayAdapter, None]: if key not in self.structure().columns: return None return ArrayAdapter.from_array(self.read([key])[key].values)