-
paguro.Config(*, restore_defaults: bool =
False, apply_on_context_enter: bool =False, **options: Unpack[ConfigParameters]) Initialise a Config object instance for context manager usage.
Any
optionskwargs should correspond to the available named “set_*” methods, but are allowed to omit the “set_” prefix for brevity.- Parameters:¶
- restore_defaults: bool =
False¶ set all options to their default values (this is applied before setting any other options).
- apply_on_context_enter: bool =
False¶ defer applying the options until a context is entered. This allows you to create multiple
Configinstances with different options, and then reuse them independently as context managers or function decorators with specific bundles of parameters.- **options: Unpack[ConfigParameters]¶
keyword args that will set the option; equivalent to calling the named “set_<option>” method with the given value.
- restore_defaults: bool =