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

Method getAllFitsLite

service/fit.py:109–124  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

107
108 @staticmethod
109 def getAllFitsLite():
110 fits = eos.db.getFitListLite()
111 shipMap = {f.shipID: None for f in fits}
112 for shipID in shipMap:
113 ship = eos.db.getItem(shipID)
114 if ship is not None:
115 shipMap[shipID] = (ship.name, ship.getShortName())
116 fitsToPurge = set()
117 for fit in fits:
118 try:
119 fit.shipName, fit.shipNameShort = shipMap[fit.shipID]
120 except (KeyError, TypeError):
121 fitsToPurge.add(fit)
122 for fit in fitsToPurge:
123 fits.remove(fit)
124 return fits
125
126 @staticmethod
127 def getFitsWithShip(shipID):

Callers 1

__init__Method · 0.80

Calls 3

getItemMethod · 0.80
getShortNameMethod · 0.80
removeMethod · 0.45

Tested by

no test coverage detected