@@ -196,7 +196,7 @@ def wes_reponse(postresult):
196196 return json .loads (postresult .text )
197197
198198
199- class WESClient ( object ) :
199+ class WESClient :
200200 def __init__ (self , service ):
201201 self .auth = service ["auth" ]
202202 self .proto = service ["proto" ]
@@ -216,7 +216,7 @@ def get_service_info(self):
216216 :return: The body of the get result as a dictionary.
217217 """
218218 postresult = requests .get (
219- "%s ://%s /ga4gh/wes/v1/service-info" % ( self . proto , self . host ) ,
219+ f" { self . proto } ://{ self . host } /ga4gh/wes/v1/service-info" ,
220220 headers = self .auth ,
221221 )
222222 return wes_reponse (postresult )
@@ -234,7 +234,7 @@ def list_runs(self):
234234 :return: The body of the get result as a dictionary.
235235 """
236236 postresult = requests .get (
237- "%s ://%s /ga4gh/wes/v1/runs" % ( self . proto , self . host ) , headers = self .auth
237+ f" { self . proto } ://{ self . host } /ga4gh/wes/v1/runs" , headers = self .auth
238238 )
239239 return wes_reponse (postresult )
240240
@@ -254,7 +254,7 @@ def run(self, wf, jsonyaml, attachments):
254254 attachments = list (expand_globs (attachments ))
255255 parts = build_wes_request (wf , jsonyaml , attachments )
256256 postresult = requests .post (
257- "%s ://%s /ga4gh/wes/v1/runs" % ( self . proto , self . host ) ,
257+ f" { self . proto } ://{ self . host } /ga4gh/wes/v1/runs" ,
258258 files = parts ,
259259 headers = self .auth ,
260260 )
@@ -271,7 +271,7 @@ def cancel(self, run_id):
271271 :return: The body of the delete result as a dictionary.
272272 """
273273 postresult = requests .post (
274- "%s ://%s /ga4gh/wes/v1/runs/%s /cancel" % ( self . proto , self . host , run_id ) ,
274+ f" { self . proto } ://{ self . host } /ga4gh/wes/v1/runs/{ run_id } /cancel" ,
275275 headers = self .auth ,
276276 )
277277 return wes_reponse (postresult )
@@ -287,7 +287,7 @@ def get_run_log(self, run_id):
287287 :return: The body of the get result as a dictionary.
288288 """
289289 postresult = requests .get (
290- "%s ://%s /ga4gh/wes/v1/runs/%s" % ( self . proto , self . host , run_id ) ,
290+ f" { self . proto } ://{ self . host } /ga4gh/wes/v1/runs/{ run_id } " ,
291291 headers = self .auth ,
292292 )
293293 return wes_reponse (postresult )
@@ -303,7 +303,7 @@ def get_run_status(self, run_id):
303303 :return: The body of the get result as a dictionary.
304304 """
305305 postresult = requests .get (
306- "%s ://%s /ga4gh/wes/v1/runs/%s /status" % ( self . proto , self . host , run_id ) ,
306+ f" { self . proto } ://{ self . host } /ga4gh/wes/v1/runs/{ run_id } /status" ,
307307 headers = self .auth ,
308308 )
309309 return wes_reponse (postresult )
0 commit comments