From 8b7d09b2ab0f39eadda56d9329180bc808f07866 Mon Sep 17 00:00:00 2001 From: Nick ODell Date: Thu, 27 Mar 2025 02:45:04 +0000 Subject: [PATCH] Remove reference cycle within SpatialData --- src/spatialdata/_core/spatialdata.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/spatialdata/_core/spatialdata.py b/src/spatialdata/_core/spatialdata.py index f011d08f8..770ef2f80 100644 --- a/src/spatialdata/_core/spatialdata.py +++ b/src/spatialdata/_core/spatialdata.py @@ -184,8 +184,6 @@ def __init__( self.validate_table_in_spatialdata(v) self.tables[k] = v - self._query = QueryManager(self) - def validate_table_in_spatialdata(self, table: AnnData) -> None: """ Validate the presence of the annotation target of a SpatialData table in the SpatialData object. @@ -525,7 +523,7 @@ def query(self) -> QueryManager: spatialdata.bounding_box_query spatialdata.polygon_query """ - return self._query + return QueryManager(self) def aggregate( self,