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

Class Attribute

service/attribute.py:23–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21
22
23class Attribute:
24 instance = None
25
26 @classmethod
27 def getInstance(cls):
28 if cls.instance is None:
29 cls.instance = Attribute()
30
31 return cls.instance
32
33 @staticmethod
34 def getAttributeInfo(identity):
35 if isinstance(identity, (int, str)):
36 info = eos.db.getAttributeInfo(identity, eager="unit")
37 elif isinstance(identity, (int, float)):
38 id_ = int(identity)
39 info = eos.db.getAttributeInfo(id_, eager="unit")
40 else:
41 info = None
42 return info

Callers 1

getInstanceMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected