Return ``__repr__``-like value from inner result + any kwargs.
(self, **kwargs: Any)
| 87 | return self._repr() |
| 88 | |
| 89 | def _repr(self, **kwargs: Any) -> str: |
| 90 | """ |
| 91 | Return ``__repr__``-like value from inner result + any kwargs. |
| 92 | """ |
| 93 | # TODO: expand? |
| 94 | # TODO: truncate command? |
| 95 | template = "<{}: cmd={!r}{}>" |
| 96 | rest = "" |
| 97 | if kwargs: |
| 98 | rest = " " + " ".join( |
| 99 | "{}={}".format(key, value) for key, value in kwargs.items() |
| 100 | ) |
| 101 | return template.format( |
| 102 | self.__class__.__name__, self.result.command, rest |
| 103 | ) |
| 104 | |
| 105 | |
| 106 | class UnexpectedExit(Failure): |