-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Get default for backend var defined in mixin (#4060)
* Get default for backend var defined in mixin If the backend var is defined in a mixin class, it won't appear in `cls.__dict__`, but the value is still retrievable via `getattr` on `cls`. Prefer to use the actual defined default before using `Var.get_default_value()`. If `Var.get_default_value()` fails, set the default to `None` such that the backend var still gets recognized as a backend var when it is used on `self`. ---- Update test_component_state to include backend vars Extra coverage for backend vars with and without defaults, defined in a ComponentState/mixin class. * fix integration test
- Loading branch information
Showing
2 changed files
with
67 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters