optimise missing team logging to use a set
This commit is contained in:
parent
8f8b96937d
commit
a839460e9a
4
main.py
4
main.py
@ -113,7 +113,7 @@ def tag(tagged: TaggedPlayer | TaggedPokemon) -> PlayerTag:
|
||||
|
||||
|
||||
TEAMS: dict[Player, Player] = {}
|
||||
_logged_teams: list[Player] = []
|
||||
_logged_teams: set[Player] = set()
|
||||
|
||||
|
||||
def team(player: Player) -> Player:
|
||||
@ -123,7 +123,7 @@ def team(player: Player) -> Player:
|
||||
else:
|
||||
if not player in _logged_teams and player:
|
||||
LOG.warning(f"missing team mapping for {player}")
|
||||
_logged_teams.append(player)
|
||||
_logged_teams.add(player)
|
||||
return player
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user