kb_python.dry
¶
Submodules¶
Package Contents¶
Functions¶
|
Return whether the current run is a dry run. |
|
Function decorator to set a function as dryable. |
|
A dummy function that doesn't do anything and just returns. |
|
A dummy function that raises an exception. For use when a particular |
- kb_python.dry.is_dry() bool ¶
Return whether the current run is a dry run.
- Returns
Whether the current run is a dry run
- kb_python.dry.dryable(dry_func: Callable) Callable ¶
Function decorator to set a function as dryable.
When this decorator is applied, the provided dry_func will be called instead of the actual function when the current run is a dry run.
- Parameters
dry_func – Function to call when it is a dry run
- Returns
Wrapped function
- kb_python.dry.dummy_function(*args, **kwargs)¶
A dummy function that doesn’t do anything and just returns. Used for making functions dryable.
- kb_python.dry.undryable_function(*args, **kwargs)¶
A dummy function that raises an exception. For use when a particular function is not dryable.
- Raises
Exception – Always