forked from VimPlug/jedi
Move the type parameter syntax tests so that it works for all versions
This commit is contained in:
@@ -436,16 +436,3 @@ res = 'f' in 'foo'; res
|
|||||||
|
|
||||||
#? bool()
|
#? bool()
|
||||||
res = not {}; res
|
res = not {}; res
|
||||||
|
|
||||||
# -----------------
|
|
||||||
# new generic syntax should not fail
|
|
||||||
# -----------------
|
|
||||||
|
|
||||||
class C[T]:
|
|
||||||
def c(self) -> str: ...
|
|
||||||
def f[T](x: T, y: T) -> int: ...
|
|
||||||
|
|
||||||
#? int()
|
|
||||||
f()
|
|
||||||
#? str()
|
|
||||||
C().c()
|
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
# python >= 3.12
|
||||||
|
|
||||||
|
# -----------------
|
||||||
|
# new generic syntax should not fail
|
||||||
|
# -----------------
|
||||||
|
|
||||||
|
class C[T]:
|
||||||
|
def c(self) -> str: ...
|
||||||
|
def f[T](x: T, y: T) -> int: ...
|
||||||
|
|
||||||
|
#? int()
|
||||||
|
f()
|
||||||
|
#? str()
|
||||||
|
C().c()
|
||||||
Reference in New Issue
Block a user