VuedaOptions
Overview
The normalized feature policy of one model.
Feature integrations read this instead of the author-written nested classes. Every registered section is present, whether or not the model declared it, so a feature always sees its defaults.
__init__
Signature
__init__(model, sections, problems)
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| model | type | yes | ||
| sections | collections.abc.Mapping[str, vueda.core.options.SectionOptions] | yes | ||
| problems | list[vueda.core.options.DeclarationProblem] | None | no | None |
Source
server/vueda/core/options.py:100
get
Return the resolved options for section name, or default when it is unregistered.
Signature
get(self, name, default)
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| self | yes | |||
| name | str | yes | ||
| default | typing.Any | no | None |
Returns
typing.Any
Source
server/vueda/core/options.py:122
is_enabled
Return whether section name is registered and this model participates in it.
Signature
is_enabled(self, name)
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| self | yes | |||
| name | str | yes |
Returns
bool
Source
server/vueda/core/options.py:126
model
problems
Source
server/vueda/core/options.py:93