Skip to content

Commit

Permalink
fix objects
Browse files Browse the repository at this point in the history
  • Loading branch information
DigiDuncan committed Dec 17, 2023
1 parent cd22d79 commit 5fa7da0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions sizebot/lib/objs.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,10 @@ def get_stats_embed(self, multiplier = 1):
value = f"**{VV(self.volume * (multiplier ** 3)):,.3mu}**\n")
if self.calories is not None:
embed.add_field(name = "Calories",
value = f"has **{Decimal(self.calories * (multiplier **3)):,.3}** calories\n")
value = f"**{Decimal(self.calories * (multiplier **3)):,.3}** calories\n")
if self.price is not None:
embed.add_field(name = "Price",
value = f"costs **${Decimal(self.price * (multiplier ** 3)):,.2}**")
value = f"**${Decimal(self.price * (multiplier ** 3)):,.2}**")
if self.weight:
embed.add_field(name = "Weight",
value = f"**{WV(self.weight * (multiplier ** 3)):,.3mu}**")
Expand Down
4 changes: 2 additions & 2 deletions sizebot/lib/units.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ def __init__(self):

def __getitem__(self, key):
try:
return next(unit for unit in self._units if unit.isUnit(key))
return next(unit for unit in self._units if unit.is_unit(key))
except StopIteration:
raise KeyError(key)

Expand Down Expand Up @@ -369,7 +369,7 @@ def __format__(self, spec):
for s in systems:
preferName = s.upper() == s
system = self._systems[s.casefold()]
unit = system.getBestUnit(value)
unit = system.get_best_unit(value)
formattedUnits.append(unit.format(value, numspec, preferName))

# Remove duplicates
Expand Down

0 comments on commit 5fa7da0

Please sign in to comment.