fix: UI rouble sign
This commit is contained in:
parent
7cb4c07128
commit
562767a60d
|
@ -15,4 +15,4 @@ class Game:
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
cleaned_string = self.price.replace("\u202f", "")[:-2]
|
cleaned_string = self.price.replace("\u202f", "")[:-2]
|
||||||
cleaned_string = cleaned_string.replace(",", ".")
|
cleaned_string = cleaned_string.replace(",", ".")
|
||||||
return f"{self.name}\nЖанр: {self.genre}\nИздатель: {self.publisher}\n" + (str(self.price) if self.discount is None else f"{math.ceil(float(cleaned_string) * self.discount / 100)} -{self.discount}%") + (f"\n{self.count} шт." if self.count is not None else "")
|
return f"{self.name}\nЖанр: {self.genre}\nИздатель: {self.publisher}\n" + (str(self.price) if self.discount is None else f"{math.ceil(float(cleaned_string) * self.discount / 100)} ₽ -{self.discount}%") + (f"\n{self.count} шт." if self.count is not None else "")
|
||||||
|
|
Loading…
Reference in New Issue