Skip to content

Commit

Permalink
⚙️ Update lock dependencies.
Browse files Browse the repository at this point in the history
  • Loading branch information
asaf-kali committed Jan 2, 2024
1 parent 45630cf commit 29dab81
Show file tree
Hide file tree
Showing 3 changed files with 687 additions and 724 deletions.
4 changes: 2 additions & 2 deletions codenames/online/codenames_game/card_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def _parse_card(card_container: WebElement) -> ParseResult:


def _parse_card_index(card_container: WebElement) -> int:
return int(card_container.get_attribute("tabindex"))
return int(card_container.get_attribute("tabindex")) # type: ignore


def _parse_card_word(card_element: WebElement) -> str:
Expand All @@ -37,7 +37,7 @@ def _parse_card_word(card_element: WebElement) -> str:


def _parse_card_color(card_element: WebElement) -> CardColor:
element_classes = card_element.get_attribute("class").split(" ")
element_classes = card_element.get_attribute("class").split(" ") # type: ignore
for card_color in CardColor:
if card_color.lower() in element_classes:
return card_color # type: ignore
Expand Down
2 changes: 1 addition & 1 deletion codenames/online/namecoding/adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def _is_card_revealed(card_element: ShadowRootElement) -> bool:
def _parse_card(card_element: ShadowRootElement) -> Card:
word = card_element.find_element(by=By.ID, value="bottom").text.strip().lower()
namecoding_color = card_element.find_element(by=By.ID, value="right").get_attribute("team")
card_color = parse_card_color(namecoding_color=namecoding_color)
card_color = parse_card_color(namecoding_color=namecoding_color) # type: ignore
revealed = _is_card_revealed(card_element=card_element)
card = Card(word=word, color=card_color, revealed=revealed)
log.debug(f"Parsed card: {card}")
Expand Down
Loading

0 comments on commit 29dab81

Please sign in to comment.