diff --git a/test/completion/pep0484_generic_parameters.py b/test/completion/pep0484_generic_parameters.py index a80d0346..4f0f0d1f 100644 --- a/test/completion/pep0484_generic_parameters.py +++ b/test/completion/pep0484_generic_parameters.py @@ -80,6 +80,7 @@ for c2, in list_t_to_list_tuple_t(list_of_ints): c2 +# Test handling of nested callables def foo(x: int) -> int: return x @@ -99,6 +100,21 @@ for b in list_func_t_to_list_func_type_t(list_of_funcs): b(int) +def bar(*a, **k) -> int: + return len(a) + len(k) + + +list_of_funcs_2 = [bar] # type: List[Callable[..., int]] + +def list_func_t_passthrough(the_list: List[Callable[..., T]]) -> List[Callable[..., T]]: + return the_list + + +for b in list_func_t_passthrough(list_of_funcs_2): + #? int() + b(None, x="x") + + mapping_int_str = {42: 'a'} # type: Dict[int, str] # Test that mappings (that have more than one parameter) are handled