(cls, group)
| 98 | |
| 99 | @classonly |
| 100 | def resolve_group(cls, group): |
| 101 | if isinstance(group, cls): |
| 102 | return {group} |
| 103 | elif isinstance(group, str): |
| 104 | try: |
| 105 | return cls._GROUPS[group].copy() |
| 106 | except KeyError: |
| 107 | raise ValueError(f'unsupported group {group!r}') |
| 108 | else: |
| 109 | resolved = set() |
| 110 | for gr in group: |
| 111 | resolve.update(cls.resolve_group(gr)) |
| 112 | return resolved |
| 113 | #return {*cls.resolve_group(g) for g in group} |
| 114 | |
| 115 | |
| 116 | KIND._TYPE_DECLS_BY_PRIORITY = [ |