Skip to content

Commit

Permalink
ref cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-Kopylov committed Feb 26, 2024
1 parent 727ab24 commit bc11494
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
10 changes: 2 additions & 8 deletions src/data_models/Record.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,9 @@ def shorten_role(
)

def get_team(self) -> Optional[Literal["Fascist", "Liberal"]]:
if (
self.role == "CH"
or self.role == "DH"
or self.role == "FW"
or self.role == "FL"
or self.role == "HL"
):
if self.role in {"CH", "DH", "FW", "FL", "HL"}:
return "Fascist"
elif self.role == "LW" or self.role == "LL":
elif self.role in {"LW", "LL"}:
return "Liberal"
else:
return None
3 changes: 0 additions & 3 deletions src/services/draw_result_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,6 @@ def create_board(svg, board_type, players):
int(x) + int(width) // 2 - (len(players) * 170 + (len(players) - 1) * 30) // 2
)
for i, player in enumerate(players):
# item_group = SubElement(board, "g", id=f"item_{i}")
# with tempfile.NamedTemporaryFile(suffix=".png", delete=False) as pic_file:
# pic_file.write(requests.get(player["user_profile_photo"]).content)
user_pic = SubElement(
board,
"image",
Expand Down

0 comments on commit bc11494

Please sign in to comment.