From 85410e09e55a685d457ae2b7932dd8b06572d162 Mon Sep 17 00:00:00 2001 From: s3lph Date: Wed, 7 Apr 2021 09:39:50 +0200 Subject: [PATCH] codestyle --- matemat/db/facade.py | 3 ++- matemat/db/primitives/Product.py | 3 ++- matemat/db/test/test_facade.py | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/matemat/db/facade.py b/matemat/db/facade.py index b4eb164..8839b6c 100644 --- a/matemat/db/facade.py +++ b/matemat/db/facade.py @@ -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. diff --git a/matemat/db/primitives/Product.py b/matemat/db/primitives/Product.py index a99c37b..5ce119c 100644 --- a/matemat/db/primitives/Product.py +++ b/matemat/db/primitives/Product.py @@ -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)) diff --git a/matemat/db/test/test_facade.py b/matemat/db/test/test_facade.py index 381f37e..0210ecd 100644 --- a/matemat/db/test/test_facade.py +++ b/matemat/db/test/test_facade.py @@ -348,7 +348,7 @@ class DatabaseTest(unittest.TestCase): db.deposit(user1, 1337) db.deposit(user2, 4242) db.deposit(user3, 1234) - clubmate = db.create_product('Club Mate', 200, 200, False , True) + clubmate = db.create_product('Club Mate', 200, 200, False, True) florapowermate = db.create_product('Flora Power Mate', 150, 250, False, True) fritzmate = db.create_product('Fritz Mate', 200, 200, False, True)