Skip to content

Commit 3b13adc

Browse files
authored
fix: Resolve __eq__ type conflict in CustomFee class (#627) (#672)
Signed-off-by: Rachitb0611 <rachitaroradav@gmail.com>
1 parent a427380 commit 3b13adc

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ This changelog is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.
3232

3333
- Added explicit read permissions to examples.yml (#623)
3434
- Improved type hinting in `file_append_transaction.py` to resolve 'mypy --strict` errors. ([#495](https://github.com/hiero-ledger/hiero-sdk-python/issues/495))
35+
- fix: Resolve `__eq__` type conflict in `CustomFee` class (#627)
3536

3637
### Breaking Changes
3738

src/hiero_sdk_python/tokens/custom_fee.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ def _to_proto(self) -> "CustomFeeProto": # Changed from _to_protobuf
6060
def _validate_checksums(self, client: Client) -> None:
6161
if self.fee_collector_account_id is not None:
6262
self.fee_collector_account_id.validate_checksum(client)
63-
64-
def __eq__(self, other: "CustomFee") -> bool:
63+
64+
def __eq__(self, other: object) -> bool:
65+
if not isinstance(other, CustomFee):
66+
return NotImplemented
67+
6568
return self.fee_collector_account_id == other.fee_collector_account_id and self.all_collectors_are_exempt == other.all_collectors_are_exempt

0 commit comments

Comments
 (0)