本文整理匯總了Python中status.Status.is_live方法的典型用法代碼示例。如果您正苦於以下問題:Python Status.is_live方法的具體用法?Python Status.is_live怎麽用?Python Status.is_live使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類status.Status
的用法示例。
在下文中一共展示了Status.is_live方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: advance_to_next_game
# 需要導入模塊: from status import Status [as 別名]
# 或者: from status.Status import is_live [as 別名]
def advance_to_next_game(self):
# We only need to check the preferred team's game status if we're
# rotating during mid-innings
if self.config.rotation_preferred_team_live_mid_inning and not self.is_offday_for_preferred_team():
preferred_overview = self.fetch_preferred_team_overview()
if Status.is_live(preferred_overview.status) and not Status.is_inning_break(preferred_overview.inning_state):
self.current_game_index = self.game_index_for_preferred_team()
self.overview = preferred_overview
self.needs_refresh = False
self.__update_layout_state()
self.print_overview_debug()
return self.current_game()
self.current_game_index = self.__next_game_index()
return self.current_game()