@@ -1965,7 +1965,10 @@ def convert_event_data(data):
1965
1965
block_hash = await self .get_chain_head ()
1966
1966
1967
1967
storage_obj = await self .query (
1968
- module = "System" , storage_function = "Events" , block_hash = block_hash , force_legacy_decode = True
1968
+ module = "System" ,
1969
+ storage_function = "Events" ,
1970
+ block_hash = block_hash ,
1971
+ force_legacy_decode = True ,
1969
1972
)
1970
1973
# bt-decode Metadata V15 is not ideal for events. Force legacy decoding for this
1971
1974
if storage_obj :
@@ -2178,7 +2181,7 @@ async def _process_response(
2178
2181
storage_item : Optional [ScaleType ] = None ,
2179
2182
result_handler : Optional [ResultHandler ] = None ,
2180
2183
runtime : Optional [Runtime ] = None ,
2181
- force_legacy_decode : bool = False
2184
+ force_legacy_decode : bool = False ,
2182
2185
) -> tuple [Any , bool ]:
2183
2186
"""
2184
2187
Processes the RPC call response by decoding it, returning it as is, or setting a handler for subscriptions,
@@ -2213,7 +2216,9 @@ async def _process_response(
2213
2216
q = bytes (query_value )
2214
2217
else :
2215
2218
q = query_value
2216
- result = await self .decode_scale (value_scale_type , q , runtime = runtime , force_legacy = force_legacy_decode )
2219
+ result = await self .decode_scale (
2220
+ value_scale_type , q , runtime = runtime , force_legacy = force_legacy_decode
2221
+ )
2217
2222
if asyncio .iscoroutinefunction (result_handler ):
2218
2223
# For multipart responses as a result of subscriptions.
2219
2224
message , bool_result = await result_handler (result , subscription_id )
@@ -2228,7 +2233,7 @@ async def _make_rpc_request(
2228
2233
result_handler : Optional [ResultHandler ] = None ,
2229
2234
attempt : int = 1 ,
2230
2235
runtime : Optional [Runtime ] = None ,
2231
- force_legacy_decode : bool = False
2236
+ force_legacy_decode : bool = False ,
2232
2237
) -> RequestManager .RequestResults :
2233
2238
request_manager = RequestManager (payloads )
2234
2239
@@ -2273,7 +2278,7 @@ async def _make_rpc_request(
2273
2278
storage_item ,
2274
2279
result_handler ,
2275
2280
runtime = runtime ,
2276
- force_legacy_decode = force_legacy_decode
2281
+ force_legacy_decode = force_legacy_decode ,
2277
2282
)
2278
2283
2279
2284
request_manager .add_response (
@@ -2305,7 +2310,7 @@ async def _make_rpc_request(
2305
2310
storage_item ,
2306
2311
result_handler ,
2307
2312
attempt + 1 ,
2308
- force_legacy_decode
2313
+ force_legacy_decode ,
2309
2314
)
2310
2315
2311
2316
return request_manager .get_results ()
@@ -3331,7 +3336,7 @@ async def query(
3331
3336
subscription_handler = None ,
3332
3337
reuse_block_hash : bool = False ,
3333
3338
runtime : Optional [Runtime ] = None ,
3334
- force_legacy_decode : bool = False
3339
+ force_legacy_decode : bool = False ,
3335
3340
) -> Optional [Union ["ScaleObj" , Any ]]:
3336
3341
"""
3337
3342
Queries substrate. This should only be used when making a single request. For multiple requests,
@@ -3364,7 +3369,7 @@ async def query(
3364
3369
storage_item ,
3365
3370
result_handler = subscription_handler ,
3366
3371
runtime = runtime ,
3367
- force_legacy_decode = force_legacy_decode
3372
+ force_legacy_decode = force_legacy_decode ,
3368
3373
)
3369
3374
result = responses [preprocessed .queryable ][0 ]
3370
3375
if isinstance (result , (list , tuple , int , float )):
0 commit comments