Bamboost
bamboost/utilities

bamboost.utilities

Attributes

  • _R=TypeVar('_R')

Functions

maybe_apply(func) -> Callable[[Optional[_T]], Optional[_U]]
Arguments:
  • func:typing.Callable[[_T], bamboost._typing._U]
compose_while_not_none(first_func, *funcs) -> Callable[_P, Optional[Any]]

Compose multiple functions into a single function. The output of each function is passed as the input to the next function. The functions are applied from left to right. If a function returns None, the next function is not called and None is returned.

Arguments:
  • first_func:typing.Callable[_P, typing.Any]
  • funcs:typing.Callable=()
Returns
typing.Callable[_P, typing.Optional[typing.Any]]The composed function.

Returns the full name of a class, including the module name.

Arguments:
  • _cls

Classes

PathSet

PathSet(self, iterable=None) -> None
Arguments:
  • iterable:typing.Optional[typing.Iterable[StrPath]]=None
PathSet.add(self, element) -> None
Arguments:
  • element:typing.Union[str, pathlib.Path]