MCPcopy Index your code
hub / github.com/pyfa-org/Pyfa / getTabExtraText

Method getTabExtraText

gui/builtinAdditionPanes/cargoView.py:249–263  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

247 return cargos
248
249 def getTabExtraText(self):
250 fitID = self.mainFrame.getActiveFit()
251 if fitID is None:
252 return None
253 sFit = Fit.getInstance()
254 fit = sFit.getFit(fitID)
255 if fit is None:
256 return None
257 opt = sFit.serviceFittingOptions["additionsLabels"]
258 # Total amount of cargo items
259 if opt in (1, 2):
260 amount = len(fit.cargo)
261 return ' ({})'.format(amount) if amount else None
262 else:
263 return None

Callers 1

updateExtraTextMethod · 0.45

Calls 3

getFitMethod · 0.80
getActiveFitMethod · 0.45
getInstanceMethod · 0.45

Tested by

no test coverage detected