Skip to content

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 ​

NameTypeRequiredDefaultDescription
defaulttyping.AnynoNone
typestuple[type, ...]no()
validatecollections.abc.Callable[[typing.Any], str | None] | NonenoNone
mergecollections.abc.Callable[[typing.Any, typing.Any], typing.Any] | NonenoNone
migration_relevantboolnoFalse

Source ​

<string>

default ​

merge ​

migration_relevant ​

types ​

validate ​

Source ​

server/vueda/core/features.py:31