ensure_kwarg_in

sconstool.util.ensure_kwarg_in(caller, key, allowed)[source]

Checks a single key from keyword arguments against allowed keys.

If key is not in allowed keys, throws TypeError.

Parameters:
  • caller (str) – name of the caller,
  • key (str) – the key to be examined,
  • allowed – sequence of allowed keys.
Returns:

True