From d155950696382ba7110b22b3a41f95ee107bb914 Mon Sep 17 00:00:00 2001 From: Roman505050 Date: Sat, 23 Nov 2024 20:31:04 +0200 Subject: [PATCH] Refactoring --- src/core/domain/transaction/entities/currency.py | 6 ------ .../domain/transaction/value_objects/amount_range.py | 12 ------------ .../domain/transaction/value_objects/data_range.py | 12 ------------ 3 files changed, 30 deletions(-) diff --git a/src/core/domain/transaction/entities/currency.py b/src/core/domain/transaction/entities/currency.py index 4c93dad..fd6cde4 100644 --- a/src/core/domain/transaction/entities/currency.py +++ b/src/core/domain/transaction/entities/currency.py @@ -30,9 +30,3 @@ def _validate_currency_code(code: str): raise ValueError( "Currency code must be a 3-letter uppercase string" ) - - def __eq__(self, other): - return self.currency_id == other.currency_id - - def __ne__(self, other): - return self.currency_id != other.currency_id diff --git a/src/core/domain/transaction/value_objects/amount_range.py b/src/core/domain/transaction/value_objects/amount_range.py index 6933ea2..a4582d7 100644 --- a/src/core/domain/transaction/value_objects/amount_range.py +++ b/src/core/domain/transaction/value_objects/amount_range.py @@ -6,15 +6,3 @@ class AmountRange: min_amount: Decimal max_amount: Decimal - - def __eq__(self, other): - return ( - self.min_amount == other.min_amount - and self.max_amount == other.max_amount - ) - - def __ne__(self, other): - return ( - self.min_amount != other.min_amount - or self.max_amount != other.max_amount - ) diff --git a/src/core/domain/transaction/value_objects/data_range.py b/src/core/domain/transaction/value_objects/data_range.py index 8c78cf8..9155377 100644 --- a/src/core/domain/transaction/value_objects/data_range.py +++ b/src/core/domain/transaction/value_objects/data_range.py @@ -6,15 +6,3 @@ class DataRange: start_date: datetime.date end_date: datetime.date - - def __eq__(self, other): - return ( - self.start_date == other.start_date - and self.end_date == other.end_date - ) - - def __ne__(self, other): - return ( - self.start_date != other.start_date - or self.end_date != other.end_date - )