From 3bccbc45c3fb14420e6acf61542bd65cbe8a6eed Mon Sep 17 00:00:00 2001 From: DevilXD Date: Sat, 9 Apr 2022 22:08:08 +0200 Subject: [PATCH] Use a walrus here --- twitch.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/twitch.py b/twitch.py index fd96735..df17c5b 100644 --- a/twitch.py +++ b/twitch.py @@ -157,8 +157,7 @@ class Twitch: return -1 def _game_key(self, channel: Channel) -> int: - game = channel.game - if game is None: + if (game := channel.game) is None: return 1 elif game not in self.games: # in case a channel is gathered from an ACL and doesn't play the expected game,