Created
September 13, 2022 16:45
-
-
Save mohammadali66/11847f8ae2683f4fc55735334d56e39f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from dataclasses import dataclass | |
from typing import NewType | |
Quantity = NewType("Quantity", int) | |
Sku = NewType("Sku", str) | |
Reference = NewType("Reference", str) | |
... | |
class Batch: | |
def __init__(self, ref: Reference, sku: Sku, qty: Quantity): | |
self.sku = sku | |
self.reference = ref | |
self._purchased_quantity = qty |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment