@@ -203,11 +203,11 @@ def _get_arguments(cls, function):
203
203
return argument_specification
204
204
205
205
@classmethod
206
- def _get_arg_spec (cls , function : Callable ):
206
+ def _get_arg_spec (cls , function : Callable ) -> inspect . FullArgSpec :
207
207
return inspect .getfullargspec (function )
208
208
209
209
@classmethod
210
- def _get_args (cls , arg_spec : inspect .FullArgSpec , function : Callable ):
210
+ def _get_args (cls , arg_spec : inspect .FullArgSpec , function : Callable ) -> list :
211
211
args = cls ._drop_self_from_args (function , arg_spec )
212
212
args .reverse ()
213
213
defaults = list (arg_spec .defaults ) if arg_spec .defaults else []
@@ -221,7 +221,7 @@ def _get_args(cls, arg_spec: inspect.FullArgSpec, function: Callable):
221
221
return formated_args
222
222
223
223
@classmethod
224
- def _drop_self_from_args (cls , function : Callable , arg_spec : inspect .FullArgSpec ):
224
+ def _drop_self_from_args (cls , function : Callable , arg_spec : inspect .FullArgSpec ) -> list :
225
225
return arg_spec .args [1 :] if inspect .ismethod (function ) else arg_spec .args
226
226
227
227
@classmethod
@@ -271,9 +271,8 @@ def _get_typing_hints(cls, function):
271
271
return hints
272
272
273
273
@classmethod
274
- def _args_as_list (cls , function , arg_spec ):
275
- function_args = []
276
- function_args .extend (cls ._drop_self_from_args (function , arg_spec ))
274
+ def _args_as_list (cls , function , arg_spec ) -> list :
275
+ function_args = cls ._drop_self_from_args (function , arg_spec )
277
276
if arg_spec .varargs :
278
277
function_args .append (arg_spec .varargs )
279
278
function_args .extend (arg_spec .kwonlyargs or [])
0 commit comments