Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
saolsen committed Apr 28, 2023
1 parent f0de9d5 commit d60a1ac
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 9 deletions.
1 change: 0 additions & 1 deletion migrations/versions/f4ed0977b4e9_players_index_from_0.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
Create Date: 2023-04-27 12:31:48.198727
"""
import sqlalchemy as sa
from alembic import op

# revision identifiers, used by Alembic.
Expand Down
6 changes: 3 additions & 3 deletions src/gameplay_computer/matches/repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import sqlalchemy
from databases import Database

from gameplay_computer import common, users, matches, agents
from gameplay_computer import users, agents
from gameplay_computer.users import User
from gameplay_computer.agents import Agent
from gameplay_computer.games.connect4 import Action as Connect4Action
Expand Down Expand Up @@ -109,8 +109,8 @@ async def create_match_turn(
If there is no next player, the match is set to "finished".
If there is a winner, it's added.
If the next turn isn't turn then we don't create a turn and return False.
This keeps us from creating double turns without making us hold a transaction through
all the game logic.
This keeps us from creating double turns without making us hold a
transaction through all the game logic.
"""
async with database.transaction():
latest_turn = await database.fetch_val(
Expand Down
2 changes: 1 addition & 1 deletion src/gameplay_computer/matches/schemas.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from datetime import datetime
from typing import Annotated, Any, Literal, Union
from typing import Annotated, Literal, Union

# from fastapi import Form
from pydantic import BaseModel, Field
Expand Down
3 changes: 2 additions & 1 deletion src/gameplay_computer/matches/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ async def create_match(
) == 0:
raise HTTPException(
status_code=status.HTTP_400_BAD_REQUEST,
detail="You cannot create a match with users unless you are one of the players.",
detail="You cannot create a match with users unless you are one"
+ "of the players.",
)
state = Connect4State()
match_id = await repo.create_match(
Expand Down
3 changes: 1 addition & 2 deletions src/gameplay_computer/web/schemas.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from datetime import datetime
from typing import Any, Literal, Self
from typing import Literal, Self

from fastapi import Form
from pydantic import BaseModel
Expand Down
2 changes: 1 addition & 1 deletion src/gameplay_computer/web/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from databases import Database

from gameplay_computer import common, matches, users, agents
from gameplay_computer import matches, users, agents
from gameplay_computer.agents import Agent
from gameplay_computer.users import User

Expand Down

0 comments on commit d60a1ac

Please sign in to comment.