Skip to content

Commit c408b32

Browse files
committed
Update RPC client instantiation method
The RPC client instantiation method has been changed in rpcapi.py. Instead of directly using the messaging.RPCClient constructor, the messaging.get_rpc_client method is now used. This change maintains the previous behavior but uses a more abstract way of instantiation.
1 parent 234a085 commit c408b32

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "stepik-plugins-client"
3-
version = "2.0.2"
3+
version = "2.0.3"
44
description = "Stepik plugins SDK"
55
authors = ["Hyperskill Team"]
66
readme = "README.md"

stepik_plugins_client/rpcapi.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ def __init__(self, transport_url: str, topic: str | None = None) -> None:
5353
target = messaging.Target(
5454
topic=self.topic, namespace=self.namespace, version=self.version
5555
)
56-
self.client = messaging.RPCClient(transport, target, serializer=RPCSerializer())
56+
self.client = messaging.get_rpc_client(
57+
transport, target, serializer=RPCSerializer()
58+
)
5759

5860

5961
class CodeRunResult(TypedDict):

0 commit comments

Comments
 (0)