🚨 Made flake8 happy

This commit is contained in:
Mawoka
2022-04-09 10:29:55 +02:00
parent ebc007ef1d
commit 87920b055c
20 changed files with 60 additions and 49 deletions
+4 -4
View File
@@ -4,7 +4,7 @@ import aiohttp
import socketio
from classquiz.config import redis, settings
from classquiz.db.models import GameSession, PlayGame
from classquiz.db.models import PlayGame
sio = socketio.AsyncServer(async_mode="asgi", cors_allowed_origins=[])
settings = settings()
@@ -20,7 +20,7 @@ async def join_game(sid, data):
if not resp_data["success"]:
print("CAPTCHA FAILED")
return
except KeyError as e:
except KeyError:
print("CAPTCHA FAILED")
return
redis_res = await redis.get(f"game:{data['game_pin']}")
@@ -89,8 +89,8 @@ async def set_question_number(sid, data):
@sio.event
async def submit_answer(sid, data):
session = await sio.get_session(sid)
redis_res = await redis.get(f"game_session:{session['game_pin']}")
game_session = GameSession(**json.loads(redis_res))
# redis_res = await redis.get(f"game_session:{session['game_pin']}")
# game_session = GameSession(**json.loads(redis_res))
game_data = PlayGame(**json.loads(await redis.get(f"game:{session['game_pin']}")))
# print(game_session)
answer_right = False