2323
2424
2525def _read_pickle (fname ):
26- with open (fname , 'rb' ) as f :
26+ with open (fname , "rb" ) as f :
2727 return pickle .load (f )
2828
2929
@@ -203,7 +203,7 @@ def average_networks(in_files, ntwk_res_file, group_id):
203203
204204 # Writes the networks and returns the name
205205 network_name = group_id + "_average.pck"
206- with open (op .abspath (network_name ), 'wb' ) as f :
206+ with open (op .abspath (network_name ), "wb" ) as f :
207207 pickle .dump (avg_ntwk , f , pickle .HIGHEST_PROTOCOL )
208208 iflogger .info ("Saving average network as %s" , op .abspath (network_name ))
209209 avg_ntwk = fix_keys_for_gexf (avg_ntwk )
@@ -487,7 +487,7 @@ def _run_interface(self, runtime):
487487 for key in list (node_measures .keys ()):
488488 newntwk = add_node_data (node_measures [key ], ntwk )
489489 out_file = op .abspath (self ._gen_outfilename (key , "pck" ))
490- with open (out_file , 'wb' ) as f :
490+ with open (out_file , "wb" ) as f :
491491 pickle .dump (newntwk , f , pickle .HIGHEST_PROTOCOL )
492492 nodentwks .append (out_file )
493493 if isdefined (self .inputs .out_node_metrics_matlab ):
@@ -502,7 +502,7 @@ def _run_interface(self, runtime):
502502 for key in list (edge_measures .keys ()):
503503 newntwk = add_edge_data (edge_measures [key ], ntwk )
504504 out_file = op .abspath (self ._gen_outfilename (key , "pck" ))
505- with open (out_file , 'wb' ) as f :
505+ with open (out_file , "wb" ) as f :
506506 pickle .dump (newntwk , f , pickle .HIGHEST_PROTOCOL )
507507 edgentwks .append (out_file )
508508 if isdefined (self .inputs .out_edge_metrics_matlab ):
@@ -527,7 +527,7 @@ def _run_interface(self, runtime):
527527 out_file = op .abspath (
528528 self ._gen_outfilename (self .inputs .out_k_crust , "pck" )
529529 )
530- with open (out_file , 'wb' ) as f :
530+ with open (out_file , "wb" ) as f :
531531 pickle .dump (ntwk_measures [key ], f , pickle .HIGHEST_PROTOCOL )
532532 kntwks .append (out_file )
533533 gpickled .extend (kntwks )
0 commit comments