pydoit_nb.typing#
Typing specifications
ConfigBundleLike#
ConfigBundleCreator#
Converter#
- class Converter(*args, **kwargs)[source]#
Bases:
ProtocolProtocol for converters
- dumps(obj, sort_keys=False)[source]#
Dump configuration to a string
- Parameters:
obj (
typing.Any) – Object to dump. The type hints aren’t great here. The assumption is that the dumping protocol should handle any type issues (I think static typing doesn’t really work here, for reasons I don’t fully have my head around).sort_keys (
bool) – Should the keys be sorted in the output?
- Returns:
str– String version ofconfig
- loads(inp, target)[source]#
Load an instance of
targetfrom a string- Parameters:
inp (
str) – String to load fromtarget (
type[typing.TypeVar(T)]) – Object type to return
- Returns:
typing.TypeVar(T) – Loaded instance oftarget