From c40cc2c6b1d6d592589e20698c3b8e87286d2649 Mon Sep 17 00:00:00 2001 From: Freddie Witherden Date: Mon, 18 Nov 2024 12:58:32 +0900 Subject: [PATCH] Reduce overhead. --- rtree/index.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rtree/index.py b/rtree/index.py index 7996567d..90e53a54 100644 --- a/rtree/index.py +++ b/rtree/index.py @@ -1507,7 +1507,8 @@ def get_index_type(self) -> int: try: return self._type except AttributeError: - self._type = type = core.rt.IndexProperty_GetIndexType(self.handle) + type = core.rt.IndexProperty_GetIndexType(self.handle) + self._type: int = type return type def set_index_type(self, value: int) -> None: @@ -1534,7 +1535,7 @@ def get_dimension(self) -> int: return self._dimension except AttributeError: dim = core.rt.IndexProperty_GetDimension(self.handle) - self._dimension = dim + self._dimension: int = dim return dim def set_dimension(self, value: int) -> None: