MCPcopy Create free account
hub / github.com/pyinvoke/invoke / _repr

Method _repr

invoke/exceptions.py:89–103  ·  view source on GitHub ↗

Return ``__repr__``-like value from inner result + any kwargs.

(self, **kwargs: Any)

Source from the content-addressed store, hash-verified

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
106class UnexpectedExit(Failure):

Callers 3

__repr__Method · 0.95
_reprMethod · 0.45
__repr__Method · 0.45

Calls 1

joinMethod · 0.80

Tested by

no test coverage detected