Example #1
0
 class TestCls:
     x = field(
         int,
         validate_type=validate_type,
         convert_type=False,
         other_validator=not_three if other_validator else None,
     )
Example #2
0
 class TestCls:
     x = field(
         int,
         optional=True,
         validator=is_positive if other_validator else None,
         converter=int if convert else None,
         default=default,
     )
Example #3
0
 class _BasicJsonClass:
     int_ = field(int)
     float_ = field(float)
     str_ = field(str)
     list_ = field(list)
     dict_ = field(dict)
     hasdefault = field(int, default=42)
     nojson = field(int, optional=True, json=False)
Example #4
0
 class TestCls:
     x = field(int)
     y = field(int, optional=True, json=False)
Example #5
0
 class TestCls:
     x = field(int)
     y = field(str)