@@ -1104,9 +1104,7 @@ def combine_formatters(
11041104 yield formatter_map [method_name ]
11051105
11061106
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 ]:
11101108 request_formatter_maps = (
11111109 ABI_REQUEST_FORMATTERS ,
11121110 # METHOD_NORMALIZERS needs to be after ABI_REQUEST_FORMATTERS
@@ -1247,7 +1245,7 @@ def apply_module_to_formatters(
12471245
12481246
12491247def get_result_formatters (
1250- method_name : Union [ RPCEndpoint , Callable [..., RPCEndpoint ]] ,
1248+ method_name : RPCEndpoint ,
12511249 module : "Module" ,
12521250) -> Callable [[RPCResponse ], Any ]:
12531251 formatters = combine_formatters ((PYTHONIC_RESULT_FORMATTERS ,), method_name )
@@ -1260,19 +1258,15 @@ def get_result_formatters(
12601258 return compose (* partial_formatters , * formatters )
12611259
12621260
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 ]:
12661262 # Note error formatters work on the full response dict
12671263 error_formatter_maps = (ERROR_FORMATTERS ,)
12681264 formatters = combine_formatters (error_formatter_maps , method_name )
12691265
12701266 return compose (* formatters )
12711267
12721268
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 ]:
12761270 formatters = combine_formatters ((NULL_RESULT_FORMATTERS ,), method_name )
12771271
12781272 return compose (* formatters )
0 commit comments