diff --git a/test/completion/basic.py b/test/completion/basic.py index 689d4e4d..b18c58ac 100644 --- a/test/completion/basic.py +++ b/test/completion/basic.py @@ -436,16 +436,3 @@ res = 'f' in 'foo'; res #? bool() 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() diff --git a/test/completion/pep0695_type_parameter_syntax.py b/test/completion/pep0695_type_parameter_syntax.py new file mode 100644 index 00000000..4381456a --- /dev/null +++ b/test/completion/pep0695_type_parameter_syntax.py @@ -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()