File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 1212
1313import boto3
1414import github_api_toolkit
15- from requests import get
1615from botocore .exceptions import ClientError
16+ from requests import get
1717
1818# GitHub Organisation
1919org = os .getenv ("GITHUB_ORG" )
@@ -74,7 +74,7 @@ def get_and_update_historic_usage(
7474 try :
7575 api_response = gh .get (f"/orgs/{ org } /copilot/metrics/reports/organization-28-day/latest" )
7676 api_response_json = api_response .json ()
77- except AttributeError as e :
77+ except AttributeError :
7878 logger .error ("Error getting usage data: %s" , api_response )
7979 return [], []
8080
@@ -95,7 +95,7 @@ def get_and_update_historic_usage(
9595 historic_usage_set = {d ["day" ] for d in historic_usage }
9696
9797 for day in usage_data :
98- if not day ["day" ] in historic_usage_set :
98+ if day ["day" ] not in historic_usage_set :
9999 new_usage_data .append (day )
100100 dates_added .append (day ["day" ])
101101 logger .info ("Added data for day %s" , day ["day" ])
You can’t perform that action at this time.
0 commit comments