def check_valid(self, amount: float) -> None:
    """Checks if amount is valid for this item type."""
    if amount < self.minimum or amount > self.maximum:
      raise ValueError('Amount out of bounds')
    if self.force_integer and amount != int(amount):
      raise ValueError('Amount not right type')
Checks if amount is valid for this item type.
concordia/components/game_master/deprecated/inventory.py