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

Method build

eos/saveddata/mutator.py:68–79  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

66 self.value = self.value # run the validator (to ensure we catch any changed min/max values might CCP release)
67
68 def build(self):
69 # try...except here to catch orphaned mutators. Pretty rare, only happens so far if hacking the database
70 # But put it here to remove the eos item link if it happens, until a better solution can be developed
71 try:
72 # dynamic attribute links to the Mutaplasmids attribute definition for this mutated definition
73 self.dynamicAttribute = next(a for a in self.item.mutaplasmid.attributes if a.attributeID == self.attrID)
74 # base attribute links to the base ite's attribute for this mutated definition (contains original, base value)
75 self.baseAttribute = self.item.baseItem.attributes[self.dynamicAttribute.name]
76 except (KeyboardInterrupt, SystemExit):
77 raise
78 except:
79 self.item = None
80
81 @validates("value")
82 def validator(self, key, val):

Callers 2

__init__Method · 0.95
initMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected