has added many chains

This commit is contained in:
KorenLazar
2021-02-06 21:42:31 +02:00
parent 5aa4cd734d
commit 18f3fa32b9
20 changed files with 198 additions and 73 deletions

View File

@@ -10,7 +10,12 @@ from bs4.element import Tag
from item import Item
class SupermarketChain:
class Meta(type):
def __repr__(cls):
return cls.__name__
class SupermarketChain(object, metaclass=Meta):
"""
A class representing a supermarket chain.
"""
@@ -122,6 +127,7 @@ class SupermarketChain:
code=item.find('ItemCode').text
)
@classmethod
@abstractmethod
def __repr__(self):
def __repr__(cls):
pass