Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
336 B
4
Indexable
Never
def get_blocklist_ids(user_id: int) -> list[int]:

    data = query(
        'select blocker, blocked from blocked_list where blocker=?',
        (user_id,)
        )
    block_pairs = (Blocked.read_from_query(*row) for row in data)
    blocked_ids = [block_pair.blocked for block_pair in block_pairs]

    return blocked_ids