Esempio n. 1
0
 def _get_schema(self):
     return fields.Dict({
         "repositories":
         fields.Dict(keys=fields.String(),
                     values=fields.Dict({
                         "paths":
                         fields.List(fields.String()),
                         "cleaners":
                         fields.Dict(keys=fields.String(),
                                     values=RepoConfigField(
                                         self._selector_schemas))
                     })),
         **self._selector_configs_schemas
     })
Esempio n. 2
0
 def __init__(self, **kwargs):
     schema = [
         fields.Dict({
             "min": fields.Any(allow_blank=True),
             "max": fields.Any(allow_blank=True)
         }),
         fields.Any(allow_blank=True),
     ]
     super(ConfigExpressionField, self).__init__(schema, **kwargs)
Esempio n. 3
0
    def get_config_fields(cls):
        ret = super(SemVerSelector, cls).get_config_fields()

        ret.update({
            "groups":
            fields.Dict(values=fields.Dict({
                "where":
                fields.Dict({
                    "major": ConfigExpressionField(),
                    "minor": ConfigExpressionField(),
                    "patch": ConfigExpressionField(),
                }),
                "preserve":
                fields.Dict({
                    "major": fields.Number(allow_blank=True),
                    "minor": fields.Number(allow_blank=True),
                    "patch": fields.Number(allow_blank=True),
                }),
                "max_items":
                fields.Number(allow_blank=True),
            }))
        })
        return ret
Esempio n. 4
0
 def add_selector_schema(self, type_name, schema):
     self._selector_schemas[type_name] = fields.Dict(schema)
Esempio n. 5
0
 def get_config_fields(cls):
     return fields.Dict(values=fields.Variant([
         fields.String(),
         fields.List(fields.String()),
         fields.Dict(values=fields.String()),
     ]))