Update wording in prettify and shortening some comments

This commit is contained in:
Luke 2018-07-04 17:00:39 +00:00
parent edb117152e
commit 9e7304e6dd

View File

@ -92,9 +92,7 @@ def get_favorite_champion(blob):
""" """
get_favorite_champion(blob) get_favorite_champion(blob)
Takes one argument, a large json data set from the stats API and parses it figure out who the players favorite champion is
to figure out who the players favorite champion is. Stores all the data
in a temp dictionary, play_times, then grabs the max value from it
""" """
play_times = {} play_times = {}
all_champions = blob['playerProfileStats']['champions'] all_champions = blob['playerProfileStats']['champions']
@ -120,9 +118,7 @@ def get_favorite_weapon(blob):
""" """
get_favorite_weapon(blob) get_favorite_weapon(blob)
Takes one argument, a large json data set from the stats API and parses it figure out what the players favorite weapon is
to figure out what the players favorite weapon is. Stores all the data
in a temp dictionary, weapon_stats, then grabs the max value from it
""" """
weapon_stats = {} weapon_stats = {}
all_champions = blob['playerProfileStats']['champions'] all_champions = blob['playerProfileStats']['champions']
@ -144,8 +140,7 @@ def get_kd(blob):
""" """
get_kd(blob) get_kd(blob)
Takes one argument, a large json data set from the stats API and parses it Parses json to find the player's k/d
to figure the players total K/D ratio
""" """
total_kills = 0 total_kills = 0
total_deaths = 0 total_deaths = 0
@ -164,7 +159,6 @@ def get_match_stats(blob, target_player):
get_match_stats(blob, target_player) get_match_stats(blob, target_player)
Takes the stats blob and a player name (so we know who's K/D we care about). Takes the stats blob and a player name (so we know who's K/D we care about).
Attempts to figure out what the ranked game type was and then pulls stats from that game Attempts to figure out what the ranked game type was and then pulls stats from that game
""" """
@ -230,13 +224,13 @@ def prettify(name):
'PLASMA_TRAIL_EXPLOSION' : 'Slash\'s Plasma Trail Explosion', 'PLASMA_TRAIL_EXPLOSION' : 'Slash\'s Plasma Trail Explosion',
'MINING_LASER' : 'Mining Laser', 'MINING_LASER' : 'Mining Laser',
'ABILITY_BERSERK' : 'Doom Slayer\'s Berserk Mode', 'ABILITY_BERSERK' : 'Doom Slayer\'s Berserk Mode',
'SWARM_GRENADE' : 'Swarm Grenade', 'SWARM_GRENADE' : 'Keel\'s Swarm Grenade',
'SB_DASH' : 'Scalbarer\'s Rush', 'SB_DASH' : 'Scalbarer\'s Rush',
'SB_STOMP' : 'Scalbarer\'s Stomp', 'SB_STOMP' : 'Scalbarer\'s Stomp',
'ACID_SPIT_DIRECT' : 'Acid Spit Direct', 'ACID_SPIT_DIRECT' : 'Acid Spit Direct',
'VENDETTA_TELEFRAG' : 'Vendetta Telefrag', 'VENDETTA_TELEFRAG' : 'Vendetta Telefrag',
'ACID_DOT' : 'Sorlag\'s Acid DOT', 'ACID_DOT' : 'Sorlag\'s Acid DOT',
'FLAME_DOT' : 'Flame DOTt', 'FLAME_DOT' : 'Flame DOT',
'FLAME' : 'Flame', 'FLAME' : 'Flame',
'ACID' : 'Acid', 'ACID' : 'Acid',
'DRONE_KAMIKAZE_EXPLOSION' : 'Drone Kamikaze Explosion', 'DRONE_KAMIKAZE_EXPLOSION' : 'Drone Kamikaze Explosion',