@@ -257,7 +257,7 @@ def size(self, haz_type=None, name=None):
257257 int
258258 """
259259 if (haz_type is not None ) and (name is not None ) and \
260- (isinstance (self .get_func (haz_type , name ), Measure )):
260+ (isinstance (self .get_measure (haz_type , name ), Measure )):
261261 return 1
262262 if (haz_type is not None ) or (name is not None ):
263263 return len (self .get_measure (haz_type , name ))
@@ -276,7 +276,7 @@ def check(self):
276276 LOGGER .error ("Wrong Measure.name: %s != %s." , name , \
277277 meas .name )
278278 raise ValueError
279- if ( key_haz != meas .haz_type ) :
279+ if key_haz != meas .haz_type :
280280 LOGGER .error ("Wrong Measure.haz_type: %s != %s." ,\
281281 key_haz , meas .haz_type )
282282 raise ValueError
@@ -456,19 +456,19 @@ def write_meas(row_ini, imp_ws, xls_data):
456456 var_names ['col_name' ]['paa_b' ], var_names ['col_name' ]['fun_map' ],
457457 var_names ['col_name' ]['exp_set' ], var_names ['col_name' ]['exp_reg' ],
458458 var_names ['col_name' ]['risk_att' ], var_names ['col_name' ]['risk_cov' ],
459- var_names ['col_name' ]['haz' ]]
459+ var_names ['col_name' ]['haz' ]]
460460 for icol , head_dat in enumerate (header ):
461461 mead_ws .write (0 , icol , head_dat )
462462 row_ini = 1
463- for haz_type , haz_dict in self ._data .items ():
463+ for _ , haz_dict in self ._data .items ():
464464 for meas_name , meas in haz_dict .items ():
465- xls_data = [meas_name , ' ' .join (list (map (str , meas .color_rgb ))),
466- meas .cost , meas .hazard_inten_imp [0 ],
467- meas .hazard_inten_imp [1 ], meas .hazard_freq_cutoff ,
468- meas .hazard_set , meas .mdd_impact [0 ], meas .mdd_impact [1 ],
469- meas .paa_impact [0 ], meas .paa_impact [1 ], meas .imp_fun_map ,
470- meas .exposures_set , meas .exp_region_id , meas .risk_transf_attach ,
471- meas .risk_transf_cover , meas .haz_type ]
465+ xls_data = [meas_name , ' ' .join (list (map (str , meas .color_rgb ))),
466+ meas .cost , meas .hazard_inten_imp [0 ],
467+ meas .hazard_inten_imp [1 ], meas .hazard_freq_cutoff ,
468+ meas .hazard_set , meas .mdd_impact [0 ], meas .mdd_impact [1 ],
469+ meas .paa_impact [0 ], meas .paa_impact [1 ], meas .imp_fun_map ,
470+ meas .exposures_set , meas .exp_region_id , meas .risk_transf_attach ,
471+ meas .risk_transf_cover , meas .haz_type ]
472472 write_meas (row_ini , mead_ws , xls_data )
473473 row_ini += 1
474- meas_wb .close ()
474+ meas_wb .close ()
0 commit comments