FeatureOption
Overview
One option inside a feature section.
types restricts accepted values by isinstance. validate receives a declared value and returns an error message, or None when the value is acceptable. merge combines an inherited value with an overriding one. Without it, a declaration replaces the inherited value. migration_relevant marks an option whose value a feature's migration generation reads.
__init__
Signature
__init__(default, types, validate, merge, migration_relevant)
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| default | typing.Any | no | None | |
| types | tuple[type, ...] | no | () | |
| validate | collections.abc.Callable[[typing.Any], str | None] | None | no | None | |
| merge | collections.abc.Callable[[typing.Any, typing.Any], typing.Any] | None | no | None | |
| migration_relevant | bool | no | False |
Source
<string>
default
merge
migration_relevant
types
validate
Source
server/vueda/core/features.py:31