Rename unknown bet
This commit is contained in:
@@ -11,7 +11,7 @@ from beaky.datamodels.ticket import (
|
||||
GoalAmount,
|
||||
GoalHandicap,
|
||||
Ticket,
|
||||
UnknownTicket,
|
||||
UnknownBet,
|
||||
WinDrawLose,
|
||||
WinDrawLoseDouble,
|
||||
WinLose,
|
||||
@@ -75,12 +75,12 @@ def _classify_bet(bet_text: str, team1: str, team2: str, date: datetime, league:
|
||||
elif team2.lower() in bet_lower:
|
||||
team_bet = "2"
|
||||
else:
|
||||
return UnknownTicket(ticketType=BetType.UNKNOWN, raw_text=bet_text, **common)
|
||||
return UnknownBet(ticketType=BetType.UNKNOWN, raw_text=bet_text, **common)
|
||||
sign = 1.0 if m.group(1) == "+" else -1.0
|
||||
handicap = sign * float(m.group(2))
|
||||
return GoalHandicap(ticketType=BetType.GOAL_HANDICAP, team_bet=team_bet, handicap_amount=handicap, **common) # type: ignore[arg-type]
|
||||
|
||||
return UnknownTicket(ticketType=BetType.UNKNOWN, raw_text=bet_text, **common)
|
||||
return UnknownBet(ticketType=BetType.UNKNOWN, raw_text=bet_text, **common)
|
||||
|
||||
|
||||
def _extract_legs(page: Page, fallback_date: datetime | None) -> list[Bet]:
|
||||
|
||||
Reference in New Issue
Block a user