Skip to content

Commit 8c4ecde

Browse files
committed
feat: remove extra from bytes def in rect and point quadtree
1 parent f81b588 commit 8c4ecde

File tree

6 files changed

+12
-32
lines changed

6 files changed

+12
-32
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "fastquadtree"
3-
version = "1.2.1"
3+
version = "1.2.2"
44
edition = "2021"
55

66
[lib]

mkdocs.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@ theme:
1212
- navigation.tracking
1313
- navigation.indexes
1414
- content.code.copy
15-
- toc.integrate
15+
- toc.follow
1616
- search.suggest
1717
- search.highlight
1818
- content.tooltips
19+
- navigation.footer
20+
- navigation.top
1921
palette:
2022
- scheme: slate
2123
primary: indigo
@@ -37,13 +39,14 @@ plugins:
3739
options:
3840
docstring_style: google
3941
merge_init_into_class: true
40-
show_source: true
42+
show_source: false
4143
show_root_heading: false
4244
show_signature: true
4345
show_if_no_docstring: true
44-
separate_signature: true
45-
line_length: 88
46-
heading_level: 2
46+
separate_signature: false
47+
line_length: 100
48+
heading_level: 3
49+
members_order: source
4750
filters: # Exclude __slots__ and __len__ and anything with a single underscore prefix (don't filter insert_many even though it has a single underscore)
4851
- "!__slots__"
4952
- "!__len__"

pysrc/fastquadtree/_base_quadtree.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
Any,
99
Generic,
1010
Iterable,
11+
Self,
1112
Sequence,
1213
Tuple,
1314
TypeVar,
@@ -136,7 +137,7 @@ def to_bytes(self) -> bytes:
136137
return pickle.dumps(self.to_dict())
137138

138139
@classmethod
139-
def from_bytes(cls, data: bytes) -> _BaseQuadTree[G, HitT, ItemType]:
140+
def from_bytes(cls, data: bytes) -> Self:
140141
"""
141142
Deserialize a quadtree from bytes.
142143

pysrc/fastquadtree/point_quadtree.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,6 @@ def __init__(
4949
track_objects=track_objects,
5050
)
5151

52-
@classmethod
53-
def from_bytes(cls, data: bytes) -> QuadTree:
54-
"""
55-
Create a QuadTree instance from serialized bytes.
56-
57-
Args:
58-
data: Serialized byte data from `to_bytes()`.
59-
Returns:
60-
A QuadTree instance.
61-
"""
62-
return super().from_bytes(data)
63-
6452
@overload
6553
def query(
6654
self, rect: Bounds, *, as_items: Literal[False] = ...

pysrc/fastquadtree/rect_quadtree.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -50,18 +50,6 @@ def __init__(
5050
track_objects=track_objects,
5151
)
5252

53-
@classmethod
54-
def from_bytes(cls, data: bytes) -> RectQuadTree:
55-
"""
56-
Create a RectQuadTree instance from serialized bytes.
57-
58-
Args:
59-
data: Serialized byte data from `to_bytes()`.
60-
Returns:
61-
A RectQuadTree instance.
62-
"""
63-
return super().from_bytes(data)
64-
6553
@overload
6654
def query(
6755
self, rect: Bounds, *, as_items: Literal[False] = ...

0 commit comments

Comments
 (0)