symconf.util module¶
- class symconf.util.KVPair(option_strings, dest, nargs=None, const=None, default=None, type=None, choices=None, required=False, help=None, metavar=None)[source]¶
Bases:
Action
- symconf.util.color_text(text, *colorama_args)[source]¶
Colorama text helper function
Note: we attempt to preserve expected nested behavior by only resetting the groups (Fore, Back, Style) affected the styles passed in. This works when an outer call is changing styles in one group, and an inner call is changing styles in another, but not when affected groups overlap.
For example, if an outer call is setting the foreground color (e.g.,
Fore.GREEN
), nested calls on the text being passed into the function can modify and reset the background or style with affecting the foreground. The primary use case here is styling a group of text a single color, but applyingBRIGHT
orDIM
styles only to some text elements within. If we didn’t reset by group, the outer coloration request will be “canceled out” as soon as the first inner call is made (since the unconditional behavior just employsStyle.RESET_ALL
).
- symconf.util.deep_update(mapping, *updating_mappings)[source]¶
Code adapted from pydantic
- Return type:
dict