From 0b3954650171e03aaff2b542b0c885724d298f8d Mon Sep 17 00:00:00 2001 From: Konstantinos Tsitsimpikos Date: Tue, 8 Oct 2024 18:37:09 +0300 Subject: [PATCH] Revert "Workaround for object_type in py>=0.32.0 (#656)" This reverts commit 76ab094f5a50e8f505758388fd9058b971ab69cc. --- src/tiledb/cloud/bioimg/ingestion.py | 2 +- src/tiledb/cloud/geospatial/ingestion.py | 2 +- src/tiledb/cloud/soma/ingest.py | 2 +- src/tiledb/cloud/vcf/ingestion.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/tiledb/cloud/bioimg/ingestion.py b/src/tiledb/cloud/bioimg/ingestion.py index 3eb3e7a9e..152192417 100644 --- a/src/tiledb/cloud/bioimg/ingestion.py +++ b/src/tiledb/cloud/bioimg/ingestion.py @@ -274,7 +274,7 @@ def register_dataset_udf( logger.debug("Object type of %s : %s", tiledb_uri, object_type) if object_type == "group": found = True - elif object_type is not None or object_type != "None": + elif object_type is not None: raise ValueError( f"Another object is already registered at '{tiledb_uri}'." ) diff --git a/src/tiledb/cloud/geospatial/ingestion.py b/src/tiledb/cloud/geospatial/ingestion.py index d2954c2c9..90492078b 100644 --- a/src/tiledb/cloud/geospatial/ingestion.py +++ b/src/tiledb/cloud/geospatial/ingestion.py @@ -942,7 +942,7 @@ def register_dataset_udf( object_type = tiledb.object_type(tiledb_uri) if object_type == "array": found = True - elif object_type is not None or object_type != "None": + elif object_type is not None: raise ValueError( f"Another object is already registered at '{tiledb_uri}'." ) diff --git a/src/tiledb/cloud/soma/ingest.py b/src/tiledb/cloud/soma/ingest.py index b5f53a74e..9bc9ce330 100644 --- a/src/tiledb/cloud/soma/ingest.py +++ b/src/tiledb/cloud/soma/ingest.py @@ -47,7 +47,7 @@ def register_dataset_udf( object_type = tiledb.object_type(tiledb_uri) if object_type == "group": found = True - elif object_type is not None or object_type != "None": + elif object_type is not None: raise ValueError( f"Another object is already registered at '{tiledb_uri}'." ) diff --git a/src/tiledb/cloud/vcf/ingestion.py b/src/tiledb/cloud/vcf/ingestion.py index cae41dbe3..3f54872ac 100644 --- a/src/tiledb/cloud/vcf/ingestion.py +++ b/src/tiledb/cloud/vcf/ingestion.py @@ -256,7 +256,7 @@ def register_dataset_udf( object_type = tiledb.object_type(tiledb_uri) if object_type == "group": found = True - elif object_type is not None or object_type != "None": + elif object_type is not None: raise ValueError( f"Another object is already registered at '{tiledb_uri}'." )