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

Function exportFitStats

service/port/shipstats.py:194–209  ·  view source on GitHub ↗

Returns the text of the stats export of the given fit

(fit, callback)

Source from the content-addressed store, hash-verified

192
193
194def exportFitStats(fit, callback):
195 """
196 Returns the text of the stats export of the given fit
197 """
198 sections = filter(None, (firepowerSection(fit), # Prune empty sections
199 tankSection(fit),
200 repsSection(fit),
201 miscSection(fit)))
202
203 text = "{} ({})\n".format(fit.name, fit.ship.item.typeName) + "\n"
204 text += "\n".join(sections)
205
206 if callback:
207 callback(text)
208 else:
209 return text

Callers 1

exportFitStatsMethod · 0.90

Calls 4

firepowerSectionFunction · 0.85
tankSectionFunction · 0.85
repsSectionFunction · 0.85
miscSectionFunction · 0.85

Tested by

no test coverage detected