Skip to content

Commit 3102215

Browse files
committed
Move the type parameter syntax tests so that it works for all versions
1 parent 1b37f2e commit 3102215

2 files changed

Lines changed: 14 additions & 13 deletions

File tree

test/completion/basic.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -436,16 +436,3 @@ def __enter__(self):
436436

437437
#? bool()
438438
res = not {}; res
439-
440-
# -----------------
441-
# new generic syntax should not fail
442-
# -----------------
443-
444-
class C[T]:
445-
def c(self) -> str: ...
446-
def f[T](x: T, y: T) -> int: ...
447-
448-
#? int()
449-
f()
450-
#? str()
451-
C().c()
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# python >= 3.12
2+
3+
# -----------------
4+
# new generic syntax should not fail
5+
# -----------------
6+
7+
class C[T]:
8+
def c(self) -> str: ...
9+
def f[T](x: T, y: T) -> int: ...
10+
11+
#? int()
12+
f()
13+
#? str()
14+
C().c()

0 commit comments

Comments
 (0)