MCPcopy Index your code
hub / github.com/google/python-fire / __str__

Method __str__

fire/trace.py:292–306  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

290 return ' '.join(str(arg) for arg in self._error.args)
291
292 def __str__(self):
293 if self.HasError():
294 return self.ErrorAsStr()
295 else:
296 # Format is: {action} "{target}" ({filename}:{lineno})
297 string = self._action
298 if self._target is not None:
299 string += f' "{self._target}"'
300 if self._filename is not None:
301 path = self._filename
302 if self._lineno is not None:
303 path += f':{self._lineno}'
304
305 string += f' ({path})'
306 return string

Callers

nothing calls this directly

Calls 2

HasErrorMethod · 0.95
ErrorAsStrMethod · 0.95

Tested by

no test coverage detected