conda_recipe_manager.utils.typing
- Description:
Provides typing utility functions.
Functions
|
Forces evaluation of a variable to a string or to None. |
- conda_recipe_manager.utils.typing.optional_str(val: dict[str, JsonType] | list[JsonType] | str | int | float | bool | None) str | None [source]
Forces evaluation of a variable to a string or to None. In other words, like str(), but preserves None.
- Parameters:
val -- Value to convert to a string.
- Returns:
String equivalent of a value or None.