Skip to content

Commit

Permalink
Remove leading white space in each line when parsing a PS team
Browse files Browse the repository at this point in the history
  • Loading branch information
hsahovic committed Jun 18, 2023
1 parent 2cf5b06 commit 319b68c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/poke_env/teambuilder/teambuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ def parse_showdown_team(team: str) -> List[TeambuilderPokemon]:
mons = []

for line in team.split("\n"):
while line and line.startswith(" "):
line = line[1:]

if line == "":
if not current_mon_has_been_added:
mons.append(current_mon)
Expand Down

0 comments on commit 319b68c

Please sign in to comment.