(self)
| 737 | self.project_cache = _cache |
| 738 | |
| 739 | def group_list(self) -> List[dict]: |
| 740 | group_list = [] |
| 741 | for i in os.listdir(Group.GROUP_DATA_DIR): |
| 742 | file = "{}/{}".format(Group.GROUP_DATA_DIR, i) |
| 743 | if os.path.isfile(file) and i.endswith(".json"): |
| 744 | group_id = i[:-5] |
| 745 | try: |
| 746 | data = json.loads(public.readFile(file)) |
| 747 | except: |
| 748 | continue |
| 749 | g = Group(group_id, data) |
| 750 | group_list.append(g) |
| 751 | |
| 752 | if not group_list: |
| 753 | return [] |
| 754 | |
| 755 | self._get_project_cache() |
| 756 | res = [] |
| 757 | for i in group_list: |
| 758 | res.append(i.group_info(self.project_cache)) |
| 759 | |
| 760 | return res |
| 761 | |
| 762 | @staticmethod |
| 763 | def add_group(data: dict) -> Optional[str]: |
nothing calls this directly
no test coverage detected