diff libervia/backend/plugins/plugin_misc_room_game.py @ 4270:0d7bb4df2343

Reformatted code base using black.
author Goffi <goffi@goffi.org>
date Wed, 19 Jun 2024 18:44:57 +0200
parents 4b842c1fb686
children
line wrap: on
line diff
--- a/libervia/backend/plugins/plugin_misc_room_game.py	Tue Jun 18 12:06:45 2024 +0200
+++ b/libervia/backend/plugins/plugin_misc_room_game.py	Wed Jun 19 18:44:57 2024 +0200
@@ -112,7 +112,9 @@
         self.game_init = game_init
         self.player_init = player_init
         self.games = {}
-        self.invitations = {}  # values are a couple (x, y) with x the time and y a list of users
+        self.invitations = (
+            {}
+        )  # values are a couple (x, y) with x the time and y a list of users
 
         # These are the default settings, which can be overwritten by child class after initialization
         self.invite_mode = self.FROM_PLAYERS if self.player_init == {} else self.FROM_NONE
@@ -460,7 +462,9 @@
         other_players = [jid.JID(player).userhostJID() for player in other_players]
         return self.prepare_room(other_players, room_jid, profile_key)
 
-    def prepare_room(self, other_players=None, room_jid=None, profile_key=C.PROF_KEY_NONE):
+    def prepare_room(
+        self, other_players=None, room_jid=None, profile_key=C.PROF_KEY_NONE
+    ):
         """Prepare the room for a game: create it if it doesn't exist and invite players.
 
         @param other_players (list[JID]): list of other players JID (bare)
@@ -716,7 +720,7 @@
         return started_elt
 
     def _send_elements(self, to_jid, data, profile=None):
-        """ TODO
+        """TODO
 
         @param to_jid: recipient JID
         @param data: list of (elem, attr, content) with:
@@ -745,7 +749,7 @@
         return defer.succeed(None)
 
     def send(self, to_jid, elem=None, attrs=None, content=None, profile=None):
-        """ TODO
+        """TODO
 
         @param to_jid: recipient JID
         @param elem: domish.Element, unicode or a couple: