fix(lint): remove unused imports and reformat with black
This commit is contained in:
@@ -260,16 +260,24 @@ class PricePerWeight:
|
||||
adjusted_weight = other.to_unit(self._per_unit_typed)
|
||||
return Money(amount=adjusted_weight.amount * self.amount, currency=self._currency_typed)
|
||||
if isinstance(other, Decimal):
|
||||
return PricePerWeight(amount=self.amount * other, currency=self._currency_typed, per_unit=self._per_unit_typed)
|
||||
return PricePerWeight(
|
||||
amount=self.amount * other, currency=self._currency_typed, per_unit=self._per_unit_typed
|
||||
)
|
||||
if isinstance(other, int):
|
||||
return PricePerWeight(amount=self.amount * Decimal(other), currency=self._currency_typed, per_unit=self._per_unit_typed)
|
||||
return PricePerWeight(
|
||||
amount=self.amount * Decimal(other), currency=self._currency_typed, per_unit=self._per_unit_typed
|
||||
)
|
||||
return NotImplemented
|
||||
|
||||
def __rmul__(self, other: object) -> PricePerWeight:
|
||||
if isinstance(other, bool):
|
||||
return NotImplemented
|
||||
if isinstance(other, Decimal):
|
||||
return PricePerWeight(amount=self.amount * other, currency=self._currency_typed, per_unit=self._per_unit_typed)
|
||||
return PricePerWeight(
|
||||
amount=self.amount * other, currency=self._currency_typed, per_unit=self._per_unit_typed
|
||||
)
|
||||
if isinstance(other, int):
|
||||
return PricePerWeight(amount=self.amount * Decimal(other), currency=self._currency_typed, per_unit=self._per_unit_typed)
|
||||
return PricePerWeight(
|
||||
amount=self.amount * Decimal(other), currency=self._currency_typed, per_unit=self._per_unit_typed
|
||||
)
|
||||
return NotImplemented
|
||||
|
||||
Reference in New Issue
Block a user