forked from s3lph/matemat
codestyle
This commit is contained in:
parent
ddcdc0f816
commit
85410e09e5
3 changed files with 5 additions and 3 deletions
|
@ -380,7 +380,8 @@ class MatematDatabase(object):
|
|||
product_id, name, price_member, price_non_member, custom_price, stock, stockable = row
|
||||
return Product(product_id, name, price_member, price_non_member, custom_price, stockable, stock)
|
||||
|
||||
def create_product(self, name: str, price_member: int, price_non_member: int, custom_price: bool, stockable: bool) -> Product:
|
||||
def create_product(self, name: str, price_member: int, price_non_member: int, custom_price:
|
||||
bool, stockable: bool) -> Product:
|
||||
"""
|
||||
Creates a new product.
|
||||
:param name: Name of the product.
|
||||
|
|
|
@ -36,4 +36,5 @@ class Product:
|
|||
self.stockable == other.stockable
|
||||
|
||||
def __hash__(self) -> int:
|
||||
return hash((self.id, self.name, self.price_member, self.price_non_member, self.custom_price, self.stock, self.stockable))
|
||||
return hash((self.id, self.name, self.price_member, self.price_non_member, self.custom_price,
|
||||
self.stock, self.stockable))
|
||||
|
|
Loading…
Reference in a new issue