]> git.rm.cloudns.org Git - xonotic/xonstat.git/commitdiff
Simplify more functions.
authorAnt Zucaro <azucaro@gmail.com>
Thu, 9 Feb 2017 00:14:26 +0000 (19:14 -0500)
committerAnt Zucaro <azucaro@gmail.com>
Thu, 9 Feb 2017 00:14:26 +0000 (19:14 -0500)
xonstat/views/submission.py

index fbfb960f1b455f9145c8bf320e1be53c84f503bc..26d35b34400fbea98d7057265c8e69b35d412d06 100644 (file)
@@ -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):