impuls.tools.types¶
- impuls.tools.types.all_non_none(lst: list[T | None]) TypeGuard[list[T]]¶
Returns
Trueif all elements oflstare notNone.>>> all_non_none([0, 1, 2, 3, 4]) True >>> all_non_none(["", "a", "b", None, "c"]) False
- impuls.tools.types.identity(x: T) T¶
identity returns
xunchanged.>>> identity(42) 42
- impuls.tools.types.AnyPath = str | bytes | os.PathLike[str] | os.PathLike[bytes]¶
AnyPath represents anything which can be interpreted as a path.
- impuls.tools.types.BytesPath = bytes | os.PathLike[bytes]¶
StrPath represents anything which can be interpreted as a bytes-based path.
- impuls.tools.types.SQLNativeType = None | int | float | str¶
SQLNativeType is a Union of types which can be directly returned by the SQLite engine:
None,int,floatandstr.
- impuls.tools.types.StrPath = str | os.PathLike[str]¶
StrPath represents anything which can be interpreted as a string-based path.