@@ -1053,9 +1053,7 @@ def combine_formatters(
10531053 yield formatter_map [method_name ]
10541054
10551055
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 ]]:
10591057 request_formatter_maps = (
10601058 ABI_REQUEST_FORMATTERS ,
10611059 # METHOD_NORMALIZERS needs to be after ABI_REQUEST_FORMATTERS
@@ -1196,7 +1194,7 @@ def apply_module_to_formatters(
11961194
11971195
11981196def get_result_formatters (
1199- method_name : Union [ RPCEndpoint , Callable [..., RPCEndpoint ]] ,
1197+ method_name : RPCEndpoint ,
12001198 module : "Module" ,
12011199) -> Callable [[RPCResponse ], Any ]:
12021200 formatters = combine_formatters ((PYTHONIC_RESULT_FORMATTERS ,), method_name )
@@ -1209,19 +1207,15 @@ def get_result_formatters(
12091207 return compose (* partial_formatters , * formatters )
12101208
12111209
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 ]:
12151211 # Note error formatters work on the full response dict
12161212 error_formatter_maps = (ERROR_FORMATTERS ,)
12171213 formatters = combine_formatters (error_formatter_maps , method_name )
12181214
12191215 return compose (* formatters )
12201216
12211217
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 ]:
12251219 formatters = combine_formatters ((NULL_RESULT_FORMATTERS ,), method_name )
12261220
12271221 return compose (* formatters )
0 commit comments