mirror of
https://github.com/davidhalter/jedi.git
synced 2026-05-17 13:59:37 +08:00
Replace some type comments with annotations
This was necessary, back when we supported Python 3.5
This commit is contained in:
@@ -19,16 +19,16 @@ TTypeAny = TypeVar('TTypeAny', bound=Type[Any])
|
||||
TCallable = TypeVar('TCallable', bound=Callable[..., Any])
|
||||
|
||||
untyped_list_str = ['abc', 'def']
|
||||
typed_list_str = ['abc', 'def'] # type: List[str]
|
||||
typed_list_str: List[str] = ['abc', 'def']
|
||||
|
||||
untyped_tuple_str = ('abc',)
|
||||
typed_tuple_str = ('abc',) # type: Tuple[str]
|
||||
typed_tuple_str: Tuple[str] = ('abc',)
|
||||
|
||||
untyped_tuple_str_int = ('abc', 4)
|
||||
typed_tuple_str_int = ('abc', 4) # type: Tuple[str, int]
|
||||
typed_tuple_str_int: Tuple[str, int] = ('abc', 4)
|
||||
|
||||
variadic_tuple_str = ('abc',) # type: Tuple[str, ...]
|
||||
variadic_tuple_str_int = ('abc', 4) # type: Tuple[Union[str, int], ...]
|
||||
variadic_tuple_str: Tuple[str, ...] = ('abc',)
|
||||
variadic_tuple_str_int: Tuple[Union[str, int], ...] = ('abc', 4)
|
||||
|
||||
|
||||
def untyped_passthrough(x):
|
||||
|
||||
Reference in New Issue
Block a user