mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-07 05:09:37 +07:00
Support attr aliases for classes and fields (PY-26354)
This commit is contained in:
@@ -35,3 +35,18 @@ class B1:
|
||||
|
||||
B1(<arg4>)
|
||||
|
||||
|
||||
@attr.attrs
|
||||
class C1:
|
||||
x = attr.ib()
|
||||
y = attr.attr(default=0)
|
||||
|
||||
C1(<arg5>)
|
||||
|
||||
|
||||
@attr.attributes
|
||||
class C2:
|
||||
x = attr.attr()
|
||||
y = attr.attrib(default="0")
|
||||
|
||||
C2(<arg6>)
|
||||
|
||||
@@ -47,4 +47,12 @@ class C1:
|
||||
a: typing.ClassVar[int]
|
||||
b: int
|
||||
|
||||
C1(<arg5>)
|
||||
C1(<arg5>)
|
||||
|
||||
|
||||
@attr.dataclass
|
||||
class D1:
|
||||
x: int
|
||||
y: str = "0"
|
||||
|
||||
D1(<arg6>)
|
||||
Reference in New Issue
Block a user