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

Method getCategory

service/market.py:549–560  ·  view source on GitHub ↗

Get category by its ID or name

(identity, *args, **kwargs)

Source from the content-addressed store, hash-verified

547
548 @staticmethod
549 def getCategory(identity, *args, **kwargs):
550 """Get category by its ID or name"""
551 if isinstance(identity, types_Category):
552 category = identity
553 elif isinstance(identity, (int, str)):
554 category = eos.db.getCategory(identity, *args, **kwargs)
555 elif isinstance(identity, float):
556 id_ = int(identity)
557 category = eos.db.getCategory(id_, *args, **kwargs)
558 else:
559 raise TypeError("Need Category object, integer, float or string as argument")
560 return category
561
562 @staticmethod
563 def getMetaGroup(identity, *args, **kwargs):

Callers 3

__init__Method · 0.95
getShipRootMethod · 0.95
getSkillGroupsMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected