From: Ant Zucaro Date: Thu, 9 Feb 2017 00:14:26 +0000 (-0500) Subject: Simplify more functions. X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=364dba8255d6343f126613f8435085ff3e07ea67;p=xonotic%2Fxonstat.git Simplify more functions. --- diff --git a/xonstat/views/submission.py b/xonstat/views/submission.py index fbfb960..26d35b3 100644 --- a/xonstat/views/submission.py +++ b/xonstat/views/submission.py @@ -408,17 +408,12 @@ def num_real_players(player_events): def should_do_weapon_stats(game_type_cd): """True of the game type should record weapon stats. False otherwise.""" - return game_type_cd not in 'CTS' + return game_type_cd not in {'cts'} def gametype_elo_eligible(game_type_cd): """True of the game type should process Elos. False otherwise.""" - elo_game_types = ('duel', 'dm', 'ca', 'ctf', 'tdm', 'ka', 'ft') - - if game_type_cd in elo_game_types: - return True - else: - return False + return game_type_cd in {'duel', 'dm', 'ca', 'ctf', 'tdm', 'ka', 'ft'} def register_new_nick(session, player, new_nick):