From 7ebbf9da447df90e41a655501a09e31cd3c140f7 Mon Sep 17 00:00:00 2001 From: Peter Law Date: Sat, 18 Apr 2020 22:56:46 +0100 Subject: [PATCH] Make this test case obey typing rules in Python Unfortunately I can't recall exactly what it was that this test case was trying to validate, however on a second look it turns out that it was working by accident and did not represent a valid use of generic type vars in Python (which cannot be used completely unbound as this was). --- test/completion/pep0484_generic_parameters.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/completion/pep0484_generic_parameters.py b/test/completion/pep0484_generic_parameters.py index dabe8d7c..a80d0346 100644 --- a/test/completion/pep0484_generic_parameters.py +++ b/test/completion/pep0484_generic_parameters.py @@ -80,11 +80,11 @@ for c2, in list_t_to_list_tuple_t(list_of_ints): c2 -def foo(x: T) -> T: +def foo(x: int) -> int: return x -list_of_funcs = [foo] # type: List[Callable[[T], T]] +list_of_funcs = [foo] # type: List[Callable[[int], int]] def list_func_t_to_list_func_type_t(the_list: List[Callable[[T], T]]) -> List[Callable[[Type[T]], T]]: def adapt(func: Callable[[T], T]) -> Callable[[Type[T]], T]: