mirror of
https://github.com/davidhalter/jedi.git
synced 2026-10-14 03:18:56 +08:00
Add a tuple[...] test for the future, see #2040
This commit is contained in:
1 parent
fe0369436e
commit
c30732eb04
2 files changed
+15
-1
No files matched your search
@@ -203,3 +203,17 @@ class NotCalledClass:
|
|||||||
self.w: float
|
self.w: float
|
||||||
#? float()
|
#? float()
|
||||||
self.w
|
self.w
|
||||||
|
|
||||||
|
def tuple_func() -> tuple[int, str]:
|
||||||
|
return 1, ""
|
||||||
|
|
||||||
|
x = tuple_func()
|
||||||
|
a, b = x
|
||||||
|
#? int()
|
||||||
|
a
|
||||||
|
#? str()
|
||||||
|
b
|
||||||
|
#? int()
|
||||||
|
x[0]
|
||||||
|
#? str()
|
||||||
|
x[1]
|
||||||
@@ -76,7 +76,7 @@ def sets(p: AbstractSet[int], q: typing.MutableSet[float]):
|
|||||||
#? ["add"]
|
#? ["add"]
|
||||||
q.a
|
q.a
|
||||||
|
|
||||||
def tuple(p: Tuple[int], q: Tuple[int, str, float], r: Tuple[B, ...]):
|
def tupletest(p: Tuple[int], q: Tuple[int, str, float], r: Tuple[B, ...]):
|
||||||
#? int()
|
#? int()
|
||||||
p[0]
|
p[0]
|
||||||
#? ['index']
|
#? ['index']
|
||||||
|
|||||||
Reference in new issue
Block a user