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 7, 2024
1 parent 5e49468 commit 02efce9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion rtree/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,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
17 changes: 12 additions & 5 deletions rtree/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
for item in stream:
self.insert(*item)
elif arrays:
raise NotImplementedError("Bulk insert only supported for "
"RTrees")
raise NotImplementedError("Bulk insert only supported for " "RTrees")

def get_size(self) -> int:
warnings.warn(
Expand Down Expand Up @@ -1282,9 +1281,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 02efce9

Please sign in to comment.