Skip to content

Commit ea10db0

Browse files
authored
fix: add-type-hints-transaction-sign (hiero-ledger#1649)
Signed-off-by: Parth J Chaudhary <[email protected]>
1 parent 62d74b8 commit ea10db0

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ This changelog is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.
136136
- Added comprehensive docstring to `compress_with_cryptography` function (#1626)
137137

138138
### Changed
139+
- Added missing type hints to sign method in Transaction class (#1630)
139140
- Refactored `examples/consensus/topic_create_transaction.py` to use `Client.from_env()` (#1611)
140141
- Updated GitHub Actions setup-node action to v6.2.0.
141142
- chore: format tests/unit/mock_server.py with black (#1542)

src/hiero_sdk_python/transaction/transaction.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
from hiero_sdk_python.utils.key_utils import Key, key_to_proto
1919

2020
if TYPE_CHECKING:
21+
from hiero_sdk_python.crypto.private_key import PrivateKey
2122
from hiero_sdk_python.schedule.schedule_create_transaction import (
2223
ScheduleCreateTransaction,
2324
)
@@ -165,7 +166,7 @@ def _map_status_error(self, response):
165166

166167
return PrecheckError(error_code, tx_id)
167168

168-
def sign(self, private_key):
169+
def sign(self, private_key: "PrivateKey") -> "Transaction":
169170
"""
170171
Signs the transaction using the provided private key.
171172

0 commit comments

Comments
 (0)