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

Method attributeIDCallback

eos/gamedata.py:702–707  ·  view source on GitHub ↗
(v)

Source from the content-addressed store, hash-verified

700
701 @staticmethod
702 def attributeIDCallback(v):
703 v = int(v)
704 if not v: # some attributes come through with a value of 0? See #1387
705 return "%d" % v
706 attribute = eos.db.getAttributeInfo(v, eager="unit")
707 return "%s (%d)" % (attribute.name.capitalize(), v)
708
709 def PreformatValue(self, value):
710 """Attributes have to be translated certain ways based on their unit (ex: decimals converting to percentages).

Callers

nothing calls this directly

Calls 1

getAttributeInfoMethod · 0.80

Tested by

no test coverage detected