Skip to content

utils

General utilities.

Functions

inside_dir

inside_dir(dir_path: Path) -> Generator[None, None, None]

Temporarily switch the current directory to the given path.

PARAMETER DESCRIPTION
dir_path

path of the directory the command is being run.

TYPE: Path

remove_none_values

remove_none_values(mapping: MutableMapping) -> dict

Removes keys with None values from a mapping.

PARAMETER DESCRIPTION
mapping

A dict-like structure

TYPE: MutableMapping

RETURNS DESCRIPTION
dict

A new dictionary with no None values.