def get_prices(ocr): price = Price(ocr) amounts = { "HT": price.get_price(price.ht), "TVA": price.get_price(price.tva), "Total": price.get_price(price.total) } return amounts
def get_prices(ocr): """This function gets eaten OCR data and find Total, TVA, HT then return an object :param ocr: eaten OCR data from an image :return: object as HT, TVA, Total :raise: need to handle empty OCR data """ price = Price(ocr) amounts = {"HT": price.get_price(price.ht), "TVA": price.get_price(price.tva), "Total": price.get_price(price.total)} return amounts