From 6e5b04b1f51c35423ffa8e51558ff09f8bdef7d8 Mon Sep 17 00:00:00 2001 From: art Date: Thu, 20 Feb 2020 19:19:20 -0600 Subject: [PATCH] fixed jacob --- data analysis/superscript.py | 1 + data analysis/tba_match_result_request.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/data analysis/superscript.py b/data analysis/superscript.py index 48b0ed29..45d9e16f 100644 --- a/data analysis/superscript.py +++ b/data analysis/superscript.py @@ -35,6 +35,7 @@ from analysis import analysis as an from numba import jit import numpy as np import pickle +import tba_match_result_request as tba try: from analysis import trueskill as Trueskill except: diff --git a/data analysis/tba_match_result_request.py b/data analysis/tba_match_result_request.py index 209452bf..4afc836f 100644 --- a/data analysis/tba_match_result_request.py +++ b/data analysis/tba_match_result_request.py @@ -3,8 +3,8 @@ def req_event_matches(eventkey,apikey): headers={'X-TBA-Auth-Key':apikey} r=requests.get('https://www.thebluealliance.com/api/v3/event/'+eventkey+'/matches/simple', headers=headers) return r -def sort_through_request(request) - if request.status_code = 200 +def sort_through_request(request): + if request.status_code == 200: x=[] for i in sorted(request.json(), key=lambda i: i['actual_time']): x.append([[i['alliances']['red']['team_keys'], i['alliances']['blue']['team_keys']],i['winning_alliance']])