Skip to content

Commit

Permalink
fix: apply black to the project
Browse files Browse the repository at this point in the history
  • Loading branch information
elitonzky committed Jan 28, 2025
1 parent 49f6e88 commit 59c8e54
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def _get_fields(self, start: str, end: str):
fields += f".end({end})"
fields += ".granularity(DAILY)"
fields += ".phone_numbers([])"
fields += '.conversation_types([])'
fields += ".conversation_types([])"
fields += '.dimensions(["conversation_type", "conversation_direction", "conversation_category"])'

return fields
Expand Down
2 changes: 1 addition & 1 deletion marketplace/core/types/emails/gmail/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def to_channel_data(self):
"smtp_host": "smtp.gmail.com",
"smtp_port": 587,
"imap_host": "imap.gmail.com",
"imap_port": 993
"imap_port": 993,
}
base_data.update(
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def apply(self, product: FacebookProductDTO, **kwargs) -> bool:

def _calculate_by_area(self, product: FacebookProductDTO):
measurementUnit = product.product_details.get("MeasurementUnit", "")
if len(measurementUnit) > 0 and measurementUnit == 'm²':
if len(measurementUnit) > 0 and measurementUnit == "m²":
return True

Check warning on line 16 in marketplace/services/vtex/business/rules/calculate_by_area.py

View check run for this annotation

Codecov / codecov/patch

marketplace/services/vtex/business/rules/calculate_by_area.py#L15-L16

Added lines #L15 - L16 were not covered by tests
return False

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@


class CurrencyBRLRoudingFloor(Rule):

def apply(self, product: FacebookProductDTO, **kwargs) -> bool:
product.price = self.format_price(product.price)
product.sale_price = self.format_price(product.sale_price)
Expand All @@ -14,6 +13,6 @@ def apply(self, product: FacebookProductDTO, **kwargs) -> bool:
@staticmethod
def format_price(price: Union[int, float]) -> str:
final_price = Decimal(price / 100)
final_price = final_price.quantize(Decimal('0.01'), rounding=ROUND_FLOOR)
final_price = final_price.quantize(Decimal("0.01"), rounding=ROUND_FLOOR)
formatted_price = f"{final_price} BRL"
return formatted_price

0 comments on commit 59c8e54

Please sign in to comment.