@@ -1053,9 +1053,7 @@ def combine_formatters(
1053
1053
yield formatter_map [method_name ]
1054
1054
1055
1055
1056
- def get_request_formatters (
1057
- method_name : Union [RPCEndpoint , Callable [..., RPCEndpoint ]]
1058
- ) -> Dict [str , Callable [..., Any ]]:
1056
+ def get_request_formatters (method_name : RPCEndpoint ) -> Callable [[RPCResponse ], Any ]]:
1059
1057
request_formatter_maps = (
1060
1058
ABI_REQUEST_FORMATTERS ,
1061
1059
# METHOD_NORMALIZERS needs to be after ABI_REQUEST_FORMATTERS
@@ -1196,7 +1194,7 @@ def apply_module_to_formatters(
1196
1194
1197
1195
1198
1196
def get_result_formatters (
1199
- method_name : Union [ RPCEndpoint , Callable [..., RPCEndpoint ]] ,
1197
+ method_name : RPCEndpoint ,
1200
1198
module : "Module" ,
1201
1199
) -> Callable [[RPCResponse ], Any ]:
1202
1200
formatters = combine_formatters ((PYTHONIC_RESULT_FORMATTERS ,), method_name )
@@ -1209,19 +1207,15 @@ def get_result_formatters(
1209
1207
return compose (* partial_formatters , * formatters )
1210
1208
1211
1209
1212
- def get_error_formatters (
1213
- method_name : Union [RPCEndpoint , Callable [..., RPCEndpoint ]]
1214
- ) -> Callable [[RPCResponse ], Any ]:
1210
+ def get_error_formatters (method_name : RPCEndpoint ) -> Callable [[RPCResponse ], Any ]:
1215
1211
# Note error formatters work on the full response dict
1216
1212
error_formatter_maps = (ERROR_FORMATTERS ,)
1217
1213
formatters = combine_formatters (error_formatter_maps , method_name )
1218
1214
1219
1215
return compose (* formatters )
1220
1216
1221
1217
1222
- def get_null_result_formatters (
1223
- method_name : Union [RPCEndpoint , Callable [..., RPCEndpoint ]]
1224
- ) -> Callable [[RPCResponse ], Any ]:
1218
+ def get_null_result_formatters (method_name : RPCEndpoint ) -> Callable [[RPCResponse ], Any ]:
1225
1219
formatters = combine_formatters ((NULL_RESULT_FORMATTERS ,), method_name )
1226
1220
1227
1221
return compose (* formatters )
0 commit comments