Files
openide/python/testData/paramInfo/DataclassTransformConstructorSignatureWithFieldsAnnotatedWithGenericDescriptor.py
Morgan Bartholomewandintellij-monorepo-bot 639ca7673b [python] PY-76819 handle None correctly
PY-80427 Fixed


IJ-MR-160807

GitOrigin-RevId: 966bdb2fd5e9a3a3ac9d06b4a7d65da3157160ba
2025-05-09 04:05:02 +00:00

20 lines
367 B
Python

from typing import dataclass_transform, TypeVar, Generic
T = TypeVar("T")
@dataclass_transform()
def deco(cls: T) -> T:
...
class MyDescriptor(Generic[T]):
def __set__(self, obj: object, value: T) -> None:
...
@deco
class MyClass:
id: MyDescriptor[int]
name: MyDescriptor[str]
year: MyDescriptor[int]
new: MyDescriptor[bool]
MyClass(<arg1>)