Skip to content

Commit 1fdffa1

Browse files
chore: extract new type vars
1 parent 973fa1a commit 1fdffa1

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

web3/method.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@
4949

5050
Munger = Callable[..., Any]
5151
RequestFormatter = Callable[[RPCResponse], TReturn]
52+
RequestArgs = Tuple[RPCEndpoint, Tuple[Any, ...]]
5253
ResponseFormatter = Callable[[RPCResponse], TReturn]
54+
ResponseFormatters = Tuple[ResponseFormatter[TReturn], ResponseFormatter[TReturn], ResponseFormatter[TReturn]]
5355

5456

5557
def _set_mungers(
@@ -188,14 +190,7 @@ def input_munger(self, module: "Module", args: Any, kwargs: Any) -> List[Any]:
188190

189191
def process_params(
190192
self, module: "Module", *args: Any, **kwargs: Any
191-
) -> Tuple[
192-
Tuple[Union[RPCEndpoint, Callable[..., RPCEndpoint]], Tuple[RPCEndpoint, ...]],
193-
Tuple[
194-
Union[TReturn, Dict[str, Callable[..., Any]]],
195-
Callable[..., Any],
196-
Union[TReturn, Callable[..., Any]],
197-
],
198-
]:
193+
) -> Tuple[RequestArgs, ResponseFormatters[TReturn]]:
199194
params = self.input_munger(module, args, kwargs)
200195

201196
if self.method_choice_depends_on_args:

0 commit comments

Comments
 (0)