Old exceptions supported only args and not kwargs. For sanity we do not allow to mix old and new behavior.
(self, *args, **kwargs)
| 69 | super().__init__(self.msg) |
| 70 | |
| 71 | def _check_params(self, *args, **kwargs): |
| 72 | """Old exceptions supported only args and not kwargs. |
| 73 | |
| 74 | For sanity we do not allow to mix old and new behavior.""" |
| 75 | if args or kwargs: |
| 76 | assert bool(args) != bool( |
| 77 | kwargs |
| 78 | ), "keyword arguments are mutually exclusive with positional args" |
| 79 | |
| 80 | def _check_kwargs(self, **kwargs): |
| 81 | if kwargs: |