Asserts that parameters are ``False``. :param called_method: The method or function that is calling this. Used for nice error messages. :param kwargs: Parameters that must be ``False``. :raises NotImplementedError: If any ``kwargs`` are ``True``.
(
called_method: Callable[..., Any],
**kwargs: bool,
)
| 8 | |
| 9 | |
| 10 | def assert_params_false( |
| 11 | called_method: Callable[..., Any], |
| 12 | **kwargs: bool, |
| 13 | ) -> None: |
| 14 | """ |
| 15 | Asserts that parameters are ``False``. |
| 16 | |
| 17 | :param called_method: The method or function that is calling this. Used for nice error messages. |
| 18 | :param kwargs: Parameters that must be ``False``. |
| 19 | :raises NotImplementedError: If any ``kwargs`` are ``True``. |
| 20 | """ |
| 21 | errors_str = ", ".join(f"{param}={value}" for param, value in kwargs.items() if value) |
| 22 | if errors_str: |
| 23 | raise NotImplementedError( |
| 24 | f"{called_method.__qualname__} does not currently support: {errors_str}" |
| 25 | ) |
| 26 | |
| 27 | |
| 28 | @check_shapes( |
no outgoing calls
searching dependent graphs…