Skip to content

Commit

Permalink
Add __slots__ to Operation class
Browse files Browse the repository at this point in the history
  • Loading branch information
Pabloo22 committed Feb 12, 2024
1 parent 184bc03 commit 8b4bc28
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion job_shop_lib/operation.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
class Operation:

__slots__ = ("machines", "duration")

def __init__(self, machines: int | list[int], duration: int):
self.machines = [machines] if isinstance(machines, int) else machines
self.duration = duration
Expand Down

0 comments on commit 8b4bc28

Please sign in to comment.