Skip to content

Commit

Permalink
Merge pull request #607 from JasonFreeberg/patch-1
Browse files Browse the repository at this point in the history
Handle bye weeks in matchup string representation
  • Loading branch information
cwendt94 authored Nov 6, 2024
2 parents 365c3ca + 16a1c5c commit 2ca554c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion espn_api/football/matchup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ def __init__(self, data):
self.away_team: Team

def __repr__(self):
return f'Matchup({self.home_team}, {self.away_team})'
if hasattr(self, 'away_team'):
return f'Matchup({self.home_team}, {self.away_team})'
else:
return f'Matchup({self.home_team}, N/A)'


def _fetch_matchup_info(self, data, team):
'''Fetch info for matchup'''
Expand Down

0 comments on commit 2ca554c

Please sign in to comment.