Skip to content

Commit

Permalink
Use a walrus here
Browse files Browse the repository at this point in the history
  • Loading branch information
DevilXD committed Apr 9, 2022
1 parent bd73798 commit 3bccbc4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions twitch.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,7 @@ def _viewers_key(channel: Channel) -> int:
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,
Expand Down

0 comments on commit 3bccbc4

Please sign in to comment.