(self)
| 47 | super().__init__(self._format()) |
| 48 | |
| 49 | def _format(self) -> str: |
| 50 | if self.context: |
| 51 | ctx = ", ".join(f"{k}={v!r}" for k, v in self.context.items()) |
| 52 | return f"[{self.kind}] {self.message} ({ctx})" |
| 53 | return f"[{self.kind}] {self.message}" |
| 54 | |
| 55 | |
| 56 | class LeanPyCallbackError(LeanError): |