Skip to content

Commit

Permalink
Got rid of f-strings
Browse files Browse the repository at this point in the history
  • Loading branch information
HarryShomer committed Dec 12, 2018
1 parent c7e2b18 commit 0bd77f7
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Binary file modified .DS_Store
Binary file not shown.
Binary file modified hockey_scraper/.DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion hockey_scraper/game_scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ def scrape_shifts(game_id, players, date):
shifts_df = html_shifts.scrape_game(game_id, players)

if shifts_df is None:
shared.print_warning(f"Unable to scrape shifts for game {game_id}.")
shared.print_warning("Unable to scrape shifts for game" + game_id)
broken_shifts_games.extend([[game_id, date]])
return None # Both failed so just return nothing

Expand Down
6 changes: 3 additions & 3 deletions hockey_scraper/live_scrape.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ def __init__(self, game_id, start_time, home_team, away_team, status, espn_id, d
self.prev_shifts_df = pd.DataFrame()

# Object creation message
print(f"The LiveGame object for game {game_id} has been created. "
f"Game starts in {self.time_until_game()} seconds.")
print("The LiveGame object for game {game_id} has been created. ".format(game_id=game_id))
print("Game starts in {time} seconds.".format(time=self.time_until_game()))

def scrape(self, force=False):
"""
Expand Down Expand Up @@ -374,7 +374,7 @@ def sleep_next_game(self):
min_game = min(scheduled_games, key=lambda x: x.time_until_game())

if min_game.time_until_game() > 0:
print(f"\nSleeping for {min_game.time_until_game()} seconds until the next earliest game starts.")
print("\nSleeping for {} seconds until the next earliest game starts.".format(min_game.time_until_game()))
time.sleep(min_game.time_until_game())

def finished(self):
Expand Down

0 comments on commit 0bd77f7

Please sign in to comment.