summaryrefslogtreecommitdiff
path: root/jimbrella/utils.py
blob: a9f4623768996d38bd4bc2bec13e7234407255e5 (plain)
1
2
3
4
5
6
def group_by_status(umbrellas: list) -> dict:
    keys = set([umb["status"] for umb in umbrellas])
    statuses = {}
    for key in keys:
        statuses[key] = [umb for umb in umbrellas if umb["status"] == key]
    return statuses