Skip to content

Commit

Permalink
add slots (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
kyleclo authored Oct 11, 2023
1 parent 3a318fc commit 309f7c9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions papermage/magelib/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@


class Entity:
__slots__ = ["spans", "boxes", "images", "metadata", "_id", "_doc"]

def __init__(
self,
spans: Optional[List[Span]] = None,
Expand Down
2 changes: 2 additions & 0 deletions papermage/magelib/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@


class Image:
__slots__ = ["_pilimage"]

def __init__(self):
self._pilimage = None

Expand Down

0 comments on commit 309f7c9

Please sign in to comment.