style: drop "— Game X" from all series blurbs
The game number is redundant with the series summary already shown on the card. Blurbs now read cleaner: "Win-or-go-home." instead of "Win-or-go-home — Game 7." Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+5
-5
@@ -119,18 +119,18 @@ def series_blurb(game):
|
|||||||
# the next matchup \u2014 fall through to a generic series-score blurb instead.
|
# the next matchup \u2014 fall through to a generic series-score blurb instead.
|
||||||
if not is_final:
|
if not is_final:
|
||||||
if state["is_game7"]:
|
if state["is_game7"]:
|
||||||
return "Win-or-go-home \u2014 Game 7."
|
return "Win-or-go-home."
|
||||||
if state["is_clincher"] and leader_name:
|
if state["is_clincher"] and leader_name:
|
||||||
return f"{leader_name} can close it out \u2014 Game {g}."
|
return f"{leader_name} can close it out."
|
||||||
if state["is_pivotal"]:
|
if state["is_pivotal"]:
|
||||||
return f"Series tied 2\u20112 \u2014 pivotal Game {g}."
|
return "Series tied 2\u20112 \u2014 pivotal."
|
||||||
if state["is_opener"]:
|
if state["is_opener"]:
|
||||||
return "Series opener"
|
return "Series opener"
|
||||||
if leader_name and trailer_name:
|
if leader_name and trailer_name:
|
||||||
return f"{leader_name} lead {state['hi']}\u2011{state['lo']}"
|
return f"{leader_name} lead {state['hi']}\u2011{state['lo']}"
|
||||||
if state["hi"] == state["lo"]:
|
if state["hi"] == state["lo"]:
|
||||||
return f"Series even at {state['hi']}\u2011{state['lo']} \u2014 Game {g}."
|
return f"Series even at {state['hi']}\u2011{state['lo']}."
|
||||||
return f"Game {g}."
|
return ""
|
||||||
|
|
||||||
|
|
||||||
def series_badges(game):
|
def series_badges(game):
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ class TestSeriesBlurb:
|
|||||||
|
|
||||||
def test_game7_blurb(self):
|
def test_game7_blurb(self):
|
||||||
game = make_playoff_game(top_wins=3, bottom_wins=3)
|
game = make_playoff_game(top_wins=3, bottom_wins=3)
|
||||||
assert series_blurb(game) == "Win-or-go-home \u2014 Game 7."
|
assert series_blurb(game) == "Win-or-go-home."
|
||||||
|
|
||||||
def test_clincher_blurb_names_leader(self):
|
def test_clincher_blurb_names_leader(self):
|
||||||
game = make_playoff_game(
|
game = make_playoff_game(
|
||||||
@@ -86,12 +86,10 @@ class TestSeriesBlurb:
|
|||||||
blurb = series_blurb(game)
|
blurb = series_blurb(game)
|
||||||
assert "Top Seeds" in blurb
|
assert "Top Seeds" in blurb
|
||||||
assert "close it out" in blurb
|
assert "close it out" in blurb
|
||||||
assert "Game 5" in blurb
|
|
||||||
|
|
||||||
def test_pivotal_blurb(self):
|
def test_pivotal_blurb(self):
|
||||||
game = make_playoff_game(top_wins=2, bottom_wins=2)
|
game = make_playoff_game(top_wins=2, bottom_wins=2)
|
||||||
assert "pivotal" in series_blurb(game).lower()
|
assert "pivotal" in series_blurb(game).lower()
|
||||||
assert "Game 5" in series_blurb(game)
|
|
||||||
|
|
||||||
def test_leader_trailer_blurb(self):
|
def test_leader_trailer_blurb(self):
|
||||||
game = make_playoff_game(top_wins=2, bottom_wins=1)
|
game = make_playoff_game(top_wins=2, bottom_wins=1)
|
||||||
@@ -102,8 +100,7 @@ class TestSeriesBlurb:
|
|||||||
def test_tied_mid_series_blurb(self):
|
def test_tied_mid_series_blurb(self):
|
||||||
game = make_playoff_game(top_wins=1, bottom_wins=1)
|
game = make_playoff_game(top_wins=1, bottom_wins=1)
|
||||||
blurb = series_blurb(game)
|
blurb = series_blurb(game)
|
||||||
assert "1" in blurb
|
assert "1‑1" in blurb
|
||||||
assert "Game 3" in blurb
|
|
||||||
|
|
||||||
def test_final_clincher_falls_through_to_leader_blurb(self):
|
def test_final_clincher_falls_through_to_leader_blurb(self):
|
||||||
# Post-game seriesStatus (3-0) would trigger the clincher branch, but
|
# Post-game seriesStatus (3-0) would trigger the clincher branch, but
|
||||||
|
|||||||
Reference in New Issue
Block a user