Reformatted code base using black.
This commit is contained in:
parent
56319cbad3
commit
53fdaa9d09
1 changed files with 12604 additions and 8966 deletions
|
|
@ -112,7 +112,9 @@ class RoomGame(object):
|
|||
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 @@ class RoomGame(object):
|
|||
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 @@ class RoomGame(object):
|
|||
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 @@ class RoomGame(object):
|
|||
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:
|
||||
|
|
|
|||
Loading…
Reference in a new issue