Skip to content

Commit e8132ff

Browse files
committed
chore: added review changes
Signed-off-by: Manish Dait <[email protected]>
1 parent 76e7627 commit e8132ff

File tree

5 files changed

+12
-11
lines changed

5 files changed

+12
-11
lines changed

src/hiero_sdk_python/client/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ def set_grpc_deadline(self, grpc_deadline: Union[int, float]) -> "Client":
363363
warnings.warn(
364364
"grpc_deadline should be smaller than request_timeout. "
365365
"This configuration may cause operations to fail unexpectedly.",
366-
FutureWarning,
366+
UserWarning,
367367
)
368368

369369
self._grpc_deadline = float(grpc_deadline)
@@ -399,7 +399,7 @@ def set_request_timeout(self, request_timeout: Union[int, float]) -> "Client":
399399
warnings.warn(
400400
"request_timeout should be larger than grpc_deadline. "
401401
"This configuration may cause operations to fail unexpectedly.",
402-
FutureWarning,
402+
UserWarning,
403403
)
404404

405405
self._request_timeout = float(request_timeout)

src/hiero_sdk_python/client/network.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,8 @@ def _set_network_nodes(self, nodes: Optional[List[_Node]] = None):
151151
self._healthy_nodes.append(node)
152152

153153
def _resolve_nodes(self, nodes: Optional[List[_Node]]) -> List[_Node]:
154-
if nodes: return nodes
154+
if nodes:
155+
return nodes
155156

156157
if self.network in ("solo", "localhost", "local"):
157158
return self._fetch_nodes_from_default_nodes()
@@ -414,7 +415,7 @@ def _readmit_nodes(self) -> None:
414415

415416
def _increase_backoff(self, node: _Node) -> None:
416417
"""
417-
Increase the node's backoff duration after a failure and remove node from healty node.
418+
Increase the node's backoff duration after a failure and remove node from healthy node.
418419
"""
419420
if not isinstance(node, _Node):
420421
raise TypeError("node must be of type _Node")

src/hiero_sdk_python/executable.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,8 @@ def set_grpc_deadline(self, grpc_deadline: Union[int, float]):
158158
if self._request_timeout is not None and grpc_deadline > self._request_timeout:
159159
warnings.warn(
160160
"grpc_deadline should be smaller than request_timeout. "
161-
"This configuration may cause operations to fail unexpectedly."
162-
, FutureWarning
161+
"This configuration may cause operations to fail unexpectedly.",
162+
UserWarning
163163
)
164164

165165
self._grpc_deadline = float(grpc_deadline)
@@ -190,7 +190,7 @@ def set_request_timeout(self, request_timeout: Union[int, float]):
190190
warnings.warn(
191191
"request_timeout should be larger than grpc_deadline. "
192192
"This configuration may cause operations to fail unexpectedly.",
193-
FutureWarning
193+
UserWarning
194194
)
195195

196196
self._request_timeout = float(request_timeout)

src/hiero_sdk_python/node.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import hashlib
22
import socket
3-
import ssl
4-
import time # Python's ssl module implements TLS (despite the name)
3+
import ssl # Python's ssl module implements TLS (despite the name)
4+
import time
55
import grpc
66
from typing import Optional
77
from hiero_sdk_python.account.account_id import AccountId

tests/unit/client_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ def test_warning_when_grpc_deadline_exceeds_request_timeout():
473473
client = Client.for_testnet()
474474
client.set_request_timeout(2)
475475

476-
with pytest.warns(FutureWarning):
476+
with pytest.warns(UserWarning):
477477
client.set_grpc_deadline(7)
478478

479479

@@ -482,7 +482,7 @@ def test_warning_when_request_timeout_less_than_grpc_deadline():
482482
client = Client.for_testnet()
483483
client.set_grpc_deadline(7)
484484

485-
with pytest.warns(FutureWarning):
485+
with pytest.warns(UserWarning):
486486
client.set_request_timeout(2)
487487

488488

0 commit comments

Comments
 (0)