Skip to content

Commit

Permalink
TLDR-473 add bbox class from dedoc (#15)
Browse files Browse the repository at this point in the history
Co-authored-by: Nikita Shevtsov <[email protected]>
  • Loading branch information
Travvy88 and Nikita Shevtsov authored Oct 2, 2023
1 parent 38733a9 commit 9ae8512
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 20 deletions.
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-10-02)
-------------------
* 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) -> int:
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.

0 comments on commit 9ae8512

Please sign in to comment.