Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Dec 12, 2024
1 parent e4a3bd9 commit 20aba93
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion rtree/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 14 additions & 4 deletions rtree/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 20aba93

Please sign in to comment.