mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-15 11:53:49 +07:00
16 lines
307 B
Python
16 lines
307 B
Python
from typing import Callable, dataclass_transform
|
|
|
|
def field(**kwargs):
|
|
...
|
|
|
|
|
|
@dataclass_transform(field_specifiers=(field,))
|
|
def my_dataclass(**kwargs) -> Callable[[type], type]:
|
|
...
|
|
|
|
@my_dataclass()
|
|
class Dataclass:
|
|
x: int = field(alias="foo")
|
|
y: int = field(alias="bar")
|
|
|
|
Dataclass(<arg1>) |