diff --git a/rtree/core.py b/rtree/core.py index e5648f7a..e9e7a355 100644 --- a/rtree/core.py +++ b/rtree/core.py @@ -135,7 +135,7 @@ def free_error_msg_ptr(result, func, cargs): ctypes.c_uint64, ctypes.c_void_p, ctypes.c_void_p, - ctypes.c_void_p + ctypes.c_void_p, ] rt.Index_CreateWithArray.restype = ctypes.c_void_p rt.Index_CreateWithArray.errcheck = check_void # type: ignore diff --git a/rtree/index.py b/rtree/index.py index 1905cab9..51d5b2e2 100644 --- a/rtree/index.py +++ b/rtree/index.py @@ -286,7 +286,9 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: try: self.handle = self._create_idx_from_array(*arrays) except AttributeError: - raise NotImplementedError("libspatialindex >= 2.1 needed for bulk insert") + raise NotImplementedError( + "libspatialindex >= 2.1 needed for bulk insert" + ) if self._exception: raise self._exception @@ -1286,9 +1288,17 @@ def _create_idx_from_array(self, ibuf, minbuf, maxbuf): d_i_stri = minbuf.strides[0] // 8 d_j_stri = minbuf.strides[1] // 8 - return IndexArrayHandle(self.properties.handle, n, d, i_stri, - d_i_stri, d_j_stri, ibuf.ctypes.data, - minbuf.ctypes.data, maxbuf.ctypes.data) + return IndexArrayHandle( + self.properties.handle, + n, + d, + i_stri, + d_i_stri, + d_j_stri, + ibuf.ctypes.data, + minbuf.ctypes.data, + maxbuf.ctypes.data, + ) def leaves(self): leaf_node_count = ctypes.c_uint32()