fix: UI rouble sign

This commit is contained in:
DEsimas 2024-12-20 01:05:55 +03:00
parent 7cb4c07128
commit 562767a60d
1 changed files with 1 additions and 1 deletions

View File

@ -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 "")