Get category by its ID or name
(identity, *args, **kwargs)
| 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): |
no outgoing calls
no test coverage detected