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

Method __getitem__

eos/modifiedAttributeDict.py:190–207  ·  view source on GitHub ↗
(self, key)

Source from the content-addressed store, hash-verified

188 self.__mutators = val
189
190 def __getitem__(self, key):
191 # Check if we have final calculated value
192 val = self.__modified.get(key)
193 if val is self.CalculationPlaceholder:
194 val = self.__modified[key] = self.__calculateValue(key)
195 if val is not None:
196 return val
197
198 # Then in values which are not yet calculated
199 if self.__intermediary:
200 val = self.__intermediary.get(key)
201 else:
202 val = None
203 if val is not None:
204 return val
205
206 # Original value is the least priority
207 return self.getOriginal(key)
208
209 def getExtended(self, key, extraMultipliers=None, ignoreAfflictors=None, default=0):
210 """

Callers

nothing calls this directly

Calls 3

__calculateValueMethod · 0.95
getOriginalMethod · 0.95
getMethod · 0.45

Tested by

no test coverage detected