-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'debarcode' of https://github.com/manuelseeger/sc2-ai-coach
- Loading branch information
Showing
3 changed files
with
23 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
# all credit to author [email protected] | ||
# https://github.com/sc2-pulse/reveal-sc2-opponent | ||
|
||
import logging | ||
from datetime import UTC, datetime | ||
from enum import Enum | ||
from typing import List, Optional | ||
|
@@ -14,6 +15,8 @@ | |
from obs_tools.types import Race as GameInfoRace | ||
from replays.util import convert_enum | ||
|
||
log = logging.getLogger(f"{config.name}.{__name__}") | ||
|
||
|
||
class SC2PulseRace(str, Enum): | ||
protoss = "PROTOSS" | ||
|
@@ -150,6 +153,8 @@ def get_teams( | |
"race": race.value, | ||
}, | ||
) | ||
if response.status_code == 404: | ||
log.debug(f"404 for {batch}, race {race.value}") | ||
response.raise_for_status() | ||
pulse_teams = [SC2PulseTeam(**t) for t in response.json()] | ||
teams.extend(pulse_teams) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters