Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tldr 473 add b box class from dedoc #15

Merged
merged 13 commits into from
Oct 2, 2023
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Changelog
=========

v0.3.5 (2023-09-29)
-------------------
* Delete `Serializable` class
* Add `__hash__` method to `BBox`

v0.3.4 (2023-09-28)
-------------------
* Add `Serializable` class
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.3.4
0.3.5
7 changes: 4 additions & 3 deletions dedocutils/data_structures/bbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@

import numpy as np

from dedocutils.data_structures.serializable import Serializable


@dataclass
class BBox(Serializable):
class BBox:
"""
Bounding box around some page object, the coordinate system starts from top left corner.
"""
Expand Down Expand Up @@ -138,3 +136,6 @@ def to_relative_dict(self, page_width: int, page_height: int) -> dict:
@staticmethod
def from_dict(some_dict: Dict[str, int]) -> "BBox":
return BBox(**some_dict)

def __hash__(self):
return hash((self.x_top_left, self.y_top_left, self.width, self.height))
16 changes: 0 additions & 16 deletions dedocutils/data_structures/serializable.py

This file was deleted.

Loading