Skip to content

Commit 8b9335e

Browse files
authored
fix: Improve type conflict in token_cancel_airdrop_transaction.py (#637)
Signed-off-by: Adityarya11 <[email protected]>
1 parent 1c20a05 commit 8b9335e

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

CHANGELOG.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,26 @@ This changelog is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.
66

77
## [Unreleased]
88

9-
109
### Added
10+
1111
- Add Google-style docstrings to `AccountInfo` class and its methods in `account_info.py`.
1212

1313
- add AccountRecordsQuery class
1414

1515
### Changed
1616

17+
- chore: fix type hint for TokenCancelAirdropTransaction pending_airdrops parameter
18+
1719
### Fixed
1820

1921
- Added explicit read permissions to examples.yml (#623)
2022

2123
### Breaking Changes
2224

23-
2425
## [0.1.7] - 2025-10-28
2526

2627
### Added
28+
2729
- Expanded `README.md` with a new "Follow Us" section detailing how to watch, star, and fork the repository (#472).
2830
- Refactored `examples/topic_create.py` into modular functions for better readability and reuse.
2931
- Add Rebasing and Signing section to signing.md with instructions for maintaining commit verification during rebase operations (#556)
@@ -63,7 +65,7 @@ This changelog is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.
6365
- Converted monolithic function in `token_create_nft_infinite.py` to multiple modular functions for better structure and ease.
6466
- docs: Use relative paths for internal GitHub links (#560).
6567
- Update pyproject.toml maintainers list.
66-
– docs: Updated README.md/CHANGELOG.md and added blog.md, bud.md and setup.md (#474)
68+
– docs: Updated README.md/CHANGELOG.md and added blog.md, bud.md and setup.md (#474)
6769
- renamed docs/sdk_developers/changelog.md to docs/sdk_developers/changelog_entry.md for clarity.
6870
- Refactor `query_balance.py` into modular, reusable functions with `setup_client()`, `create_account()`, `get_balance()`, `transfer_hbars()`, and `main()` for improved readability, maintainability, and error handling.
6971
- Unified balance and transfer logging format — both now consistently display values in hbars for clarity.
@@ -75,6 +77,7 @@ This changelog is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.
7577
- Type hinting for `Topic` related transactions.
7678

7779
### Removed
80+
7881
- Remove deprecated camelCase alias support and `_DeprecatedAliasesMixin`; SDK now only exposes snake_case attributes for `NftId`, `TokenInfo`, and `TransactionReceipt`. (Issue #428)
7982

8083
## [0.1.6] - 2025-10-21
@@ -131,6 +134,7 @@ This changelog is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.
131134
## [0.1.5] - 2025-09-25
132135

133136
### Added
137+
134138
- ScheduleSignTransaction class
135139
- NodeUpdateTransaction class
136140
- NodeDeleteTransaction class

src/hiero_sdk_python/tokens/token_cancel_airdrop_transaction.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from typing import Optional
12
from hiero_sdk_python.executable import _Method
23
from hiero_sdk_python.hapi.services import basic_types_pb2, token_cancel_airdrop_pb2
34
from hiero_sdk_python.hapi.services.schedulable_transaction_body_pb2 import (
@@ -12,12 +13,12 @@ class TokenCancelAirdropTransaction(Transaction):
1213
1314
This transaction allows users to cancel one or more airdrops for both fungible tokens and NFTs.
1415
"""
15-
def __init__(self, pending_airdrops: list[PendingAirdropId]=None) -> None:
16+
def __init__(self, pending_airdrops: Optional[list[PendingAirdropId]] = None) -> None:
1617
"""
1718
Initializes a new TokenCancelAirdropTransaction instance.
1819
1920
Args:
20-
pending_airdrops (list[PendingAirdropId], optional): An initial list of pending airdrop IDs.
21+
pending_airdrops (Optional[list[PendingAirdropId]]): An optional list of pending airdrop IDs.
2122
"""
2223
super().__init__()
2324
self.pending_airdrops: list[PendingAirdropId] = pending_airdrops or []
@@ -105,4 +106,4 @@ def _get_method(self, channel):
105106
return _Method(
106107
transaction_func=channel.token.cancelAirdrop,
107108
query_func=None
108-
)
109+
)

0 commit comments

Comments
 (0)