MCPcopy Create free account
hub / github.com/pyfa-org/Pyfa / getText

Method getText

gui/builtinViewColumns/attributeDisplayGraph.py:51–64  ·  view source on GitHub ↗
(self, stuff)

Source from the content-addressed store, hash-verified

49 raise NotImplementedError
50
51 def getText(self, stuff):
52 if isinstance(stuff, BaseWrapper):
53 stuff = stuff.item
54 if isinstance(stuff, (Fit, TargetProfile)):
55 val, unit = self._getValue(stuff)
56 if val is None:
57 return ''
58 # Stick to value - 25k GJ
59 if self.stickPrefixToValue:
60 return '{} {}'.format(formatAmount(val, *self.formatSpec), unit)
61 # Stick to unit - 25 km
62 else:
63 return formatAmount(val, *self.formatSpec, unitName=unit)
64 return ''
65
66 @abstractmethod
67 def _getFitTooltip(self):

Callers

nothing calls this directly

Calls 2

_getValueMethod · 0.95
formatAmountFunction · 0.90

Tested by

no test coverage detected