From eece409730fe3fd2c2d5501e2e3b7996a5a62f28 Mon Sep 17 00:00:00 2001 From: Daniil Kalinin Date: Mon, 22 Jun 2026 16:06:04 +0200 Subject: [PATCH] misc [tests]: Fix and update test data (cherry picked from commit 6e762349fa759960d620d720b64c1daadd03ecde) GitOrigin-RevId: f32f34da2124b388f31f01a21cfcc52b90c1c1b9 --- .../com/jetbrains/python/types/PyCallableTypeTest.kt | 7 ++----- .../com/jetbrains/python/types/PyGenericTypeTest.kt | 4 +--- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/python/testSrc/com/jetbrains/python/types/PyCallableTypeTest.kt b/python/testSrc/com/jetbrains/python/types/PyCallableTypeTest.kt index e1184edf91e6..22067430f775 100644 --- a/python/testSrc/com/jetbrains/python/types/PyCallableTypeTest.kt +++ b/python/testSrc/com/jetbrains/python/types/PyCallableTypeTest.kt @@ -817,12 +817,9 @@ class PyCallableTypeTest : PyCodeInsightTestCase() { @Test @TestFor(issues = ["PY-90348"]) fun `Concatenate-typed decorator keeps the receiver type`() = test(""" - from typing import Any, Callable, Concatenate, ParamSpec, TypeVar + from typing import Any, Callable, Concatenate - P = ParamSpec("P") - R = TypeVar("R") - - def deco(fn: Callable[Concatenate[Any, P], R]) -> Callable[P, R]: ... + def deco[**P, R](fn: Callable[Concatenate[Any, P], R]) -> Callable[P, R]: ... class C: @deco diff --git a/python/testSrc/com/jetbrains/python/types/PyGenericTypeTest.kt b/python/testSrc/com/jetbrains/python/types/PyGenericTypeTest.kt index aaa6d2d61bc9..5042b95f215a 100644 --- a/python/testSrc/com/jetbrains/python/types/PyGenericTypeTest.kt +++ b/python/testSrc/com/jetbrains/python/types/PyGenericTypeTest.kt @@ -785,9 +785,7 @@ class PyGenericTypeTest : PyCodeInsightTestCase() { @Test @TestFor(issues = ["PY-90345"]) fun `parameterized union TypeAlias with class-object arm PEP695`() = test(""" - from typing import Generic, TypeVar - T = TypeVar('T') - class Role(Generic[T]): ... + class Role[T]: ... type Alias[T] = Role[T] | type[T] expr: Alias[int] #└ TYPE Role[int] | type[int]