mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 22:44:27 +08:00
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).
This commit is contained in:
@@ -80,11 +80,11 @@ for c2, in list_t_to_list_tuple_t(list_of_ints):
|
|||||||
c2
|
c2
|
||||||
|
|
||||||
|
|
||||||
def foo(x: T) -> T:
|
def foo(x: int) -> int:
|
||||||
return x
|
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 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]:
|
def adapt(func: Callable[[T], T]) -> Callable[[Type[T]], T]:
|
||||||
|
|||||||
Reference in New Issue
Block a user