From c0c86a88fbbd6a0caac44592b4c0c0b8e20e2c00 Mon Sep 17 00:00:00 2001 From: Tamas Kiss <kiss.tamas@kszk.bme.hu> Date: Tue, 8 Mar 2022 03:14:03 +0100 Subject: [PATCH] doc: Clarifying how remainders handled --- mattermost_matchmaker/matchmaking.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/mattermost_matchmaker/matchmaking.py b/mattermost_matchmaker/matchmaking.py index 3d71d9c..c041f8b 100644 --- a/mattermost_matchmaker/matchmaking.py +++ b/mattermost_matchmaker/matchmaking.py @@ -63,9 +63,18 @@ def create_group(client: mattermost.MMApi, ids: Iterable[str]) -> None: def make_matches_for_members(client: mattermost.MMApi, members: Iterable[dict], - group_size: int = 2) -> Tuple[List[str], str]: + group_size: int = 2) -> Tuple[List[str], Optional[str]]: """ Making matches in a channel + + Side effects: A Groupchat Channel will be created for the paired groups. + + A group chat would be created for the last group with less than group_size members (remainders) + if and only if there are more than 1 member in the remainder group. In this case, the second item + of the returned tuple would be None. + + If the remainder group would only consist of one member, instead of creating a group for them, it is returned as + the second item in the tuple. """ groups_created = [] -- GitLab