@@ -1104,9 +1104,7 @@ def combine_formatters(
1104
1104
yield formatter_map [method_name ]
1105
1105
1106
1106
1107
- def get_request_formatters (
1108
- method_name : Union [RPCEndpoint , Callable [..., RPCEndpoint ]],
1109
- ) -> Dict [str , Callable [..., Any ]]:
1107
+ def get_request_formatters (method_name : RPCEndpoint ) -> Callable [[RPCResponse ], Any ]:
1110
1108
request_formatter_maps = (
1111
1109
ABI_REQUEST_FORMATTERS ,
1112
1110
# METHOD_NORMALIZERS needs to be after ABI_REQUEST_FORMATTERS
@@ -1247,7 +1245,7 @@ def apply_module_to_formatters(
1247
1245
1248
1246
1249
1247
def get_result_formatters (
1250
- method_name : Union [ RPCEndpoint , Callable [..., RPCEndpoint ]] ,
1248
+ method_name : RPCEndpoint ,
1251
1249
module : "Module" ,
1252
1250
) -> Callable [[RPCResponse ], Any ]:
1253
1251
formatters = combine_formatters ((PYTHONIC_RESULT_FORMATTERS ,), method_name )
@@ -1260,19 +1258,15 @@ def get_result_formatters(
1260
1258
return compose (* partial_formatters , * formatters )
1261
1259
1262
1260
1263
- def get_error_formatters (
1264
- method_name : Union [RPCEndpoint , Callable [..., RPCEndpoint ]],
1265
- ) -> Callable [[RPCResponse ], Any ]:
1261
+ def get_error_formatters (method_name : RPCEndpoint ) -> Callable [[RPCResponse ], Any ]:
1266
1262
# Note error formatters work on the full response dict
1267
1263
error_formatter_maps = (ERROR_FORMATTERS ,)
1268
1264
formatters = combine_formatters (error_formatter_maps , method_name )
1269
1265
1270
1266
return compose (* formatters )
1271
1267
1272
1268
1273
- def get_null_result_formatters (
1274
- method_name : Union [RPCEndpoint , Callable [..., RPCEndpoint ]],
1275
- ) -> Callable [[RPCResponse ], Any ]:
1269
+ def get_null_result_formatters (method_name : RPCEndpoint ) -> Callable [[RPCResponse ], Any ]:
1276
1270
formatters = combine_formatters ((NULL_RESULT_FORMATTERS ,), method_name )
1277
1271
1278
1272
return compose (* formatters )
0 commit comments