launch.utilities.ensure_argument_type_impl module

Module for the ensure_argument_type() utility function.

launch.utilities.ensure_argument_type_impl.ensure_argument_type(argument: Any, types: type | Iterable[type], argument_name: str, caller: str | None = None) None[source]

Ensure that the given argument is an instance of or subclass of one of the given types.

If the argument does not match one of the types, a TypeError is raised. The caller is included in the error message if given and not None.