#!/usr/bin/env python

import json
import os
import tarfile

# rely on the fact that pangolin itself uses the requests module
import requests

response = requests.get("https://api.github.com/repos/cov-lineages/pangoLEARN/releases/latest")
if response.status_code == 200:
    details = json.loads(response.text)
    response = requests.get(details["tarball_url"])
    if response.status_code == 200:
        open("pangolearn.tgz", "wb").write(response.content)
        tf = tarfile.open("pangolearn.tgz")
        pl_path = tf.next().name
        tf.extractall()
        os.rename(pl_path + '/pangoLEARN', 'datadir')
    else:
        response.raise_for_status()
else:
    response.raise_for_status()



@@ -160,16 +160,21 @@
 sts.get(
+%0A    
 %22https:/
@@ -235,16 +235,17 @@
 /latest%22
+%0A
 )%0Aif res
@@ -588,17 +588,17 @@
 _path + 
-'
+%22
 /pangoLE
@@ -604,20 +604,20 @@
 EARN
-', '
+%22, %22
 datadir
-'
+%22
 )%0A  
@@ -698,10 +698,8 @@
 tatus()%0A
-%0A%0A

Fix flake8 error