From 364dba8255d6343f126613f8435085ff3e07ea67 Mon Sep 17 00:00:00 2001 From: Ant Zucaro Date: Wed, 8 Feb 2017 19:14:26 -0500 Subject: [PATCH] Simplify more functions. --- xonstat/views/submission.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) 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): -- 2.39.2