mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-07 15:12:51 +00:00
perf: specify slots on FIFO queue
This commit is contained in:
committed by
Ankush Menat
parent
aa0e163b1f
commit
745caf911a
@@ -20,6 +20,10 @@ class FifoValuation:
|
|||||||
ref: https://en.wikipedia.org/wiki/FIFO_and_LIFO_accounting
|
ref: https://en.wikipedia.org/wiki/FIFO_and_LIFO_accounting
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
# specifying the attributes to save resources
|
||||||
|
# ref: https://docs.python.org/3/reference/datamodel.html#slots
|
||||||
|
__slots__ = ["queue",]
|
||||||
|
|
||||||
def __init__(self, state: Optional[List[FifoBin]]):
|
def __init__(self, state: Optional[List[FifoBin]]):
|
||||||
self.queue: List[FifoBin] = state if state is not None else []
|
self.queue: List[FifoBin] = state if state is not None else []
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user