mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 06:24:27 +08:00
Make sure that Tuple/Callable instances have the correct py__class__
This commit is contained in:
@@ -10,6 +10,7 @@ from typing import (
|
||||
Type,
|
||||
TypeVar,
|
||||
Union,
|
||||
Sequence,
|
||||
)
|
||||
|
||||
K = TypeVar('K')
|
||||
@@ -165,6 +166,9 @@ some_str = NotImplemented # type: str
|
||||
#? str()
|
||||
first(some_str)
|
||||
|
||||
annotated = [len] # type: List[ Callable[[Sequence[float]], int] ]
|
||||
#? int()
|
||||
first(annotated)()
|
||||
|
||||
# Test that the right type is chosen when a partially realised mapping is expected
|
||||
def values(mapping: Mapping[int, T]) -> List[T]:
|
||||
|
||||
Reference in New Issue
Block a user