mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-18 20:41:22 +07:00
26 lines
366 B
Python
26 lines
366 B
Python
import attr
|
|
|
|
|
|
@attr.s
|
|
class Foo:
|
|
x = attr.ib()
|
|
y = attr.ib()
|
|
z = attr.ib()
|
|
|
|
@x.validator
|
|
def validate_x(self, attribute):
|
|
pass
|
|
|
|
@y.validator
|
|
def validate_y(self, attribute, value):
|
|
pass
|
|
|
|
def validate_z1(self, ):
|
|
pass
|
|
|
|
def validate_z2():
|
|
pass
|
|
|
|
@z.default
|
|
def init_z(self, ):
|
|
return 1 |