From 51f6626aa0dabffebeb65148977778cad2a245b8 Mon Sep 17 00:00:00 2001 From: John Vouvakis Manousakis Date: Sun, 19 May 2024 03:43:34 -0700 Subject: [PATCH] Lint code. --- pelicun/db.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pelicun/db.py b/pelicun/db.py index 3a4d9d433..6ba3b8483 100644 --- a/pelicun/db.py +++ b/pelicun/db.py @@ -1928,8 +1928,9 @@ def create_Hazus_EQ_repair_db( else: ds_i = DS_i + # Convert percentage to ratio. df_db.loc[(cmp_id, 'Cost'), f'DS{DS_i}-Theta_0'] = ( - f"{S_data['Repair_cost'][occ_type][ds_i - 1] / 100.00:.3f}" # Convert percentage to ratio. + f"{S_data['Repair_cost'][occ_type][ds_i - 1] / 100.00:.3f}" ) df_db.loc[(cmp_id, 'Time'), f'DS{DS_i}-Theta_0'] = S_data['Repair_time'][ @@ -1969,8 +1970,9 @@ def create_Hazus_EQ_repair_db( {f"DS{DS_i}": {"Description": ds_meta[f"DS{DS_i}"]}} ) + # Convert percentage to ratio. df_db.loc[(cmp_id, 'Cost'), f'DS{DS_i}-Theta_0'] = ( - f"{NSD_data['Repair_cost'][occ_type][DS_i - 1] / 100.00:.3f}" # Convert percentage to ratio. + f"{NSD_data['Repair_cost'][occ_type][DS_i - 1] / 100.00:.3f}" ) # store metadata @@ -2006,8 +2008,9 @@ def create_Hazus_EQ_repair_db( {f"DS{DS_i}": {"Description": ds_meta[f"DS{DS_i}"]}} ) + # Convert percentage to ratio. df_db.loc[(cmp_id, 'Cost'), f'DS{DS_i}-Theta_0'] = ( - f"{NSA_data['Repair_cost'][occ_type][DS_i - 1] / 100.00:.3f}" # Convert percentage to ratio. + f"{NSA_data['Repair_cost'][occ_type][DS_i - 1] / 100.00:.3f}" ) # store metadata @@ -2050,8 +2053,9 @@ def create_Hazus_EQ_repair_db( {f"DS{DS_i}": {"Description": ds_meta[f"DS{DS_i}"]}} ) + # Convert percentage to ratio. df_db.loc[(cmp_id, 'Cost'), f'DS{DS_i}-Theta_0'] = ( - f"{LF_data['Repair_cost'][occ_type][ds_i - 1] / 100.00:.3f}" # Convert percentage to ratio. + f"{LF_data['Repair_cost'][occ_type][ds_i - 1] / 100.00:.3f}" ) df_db.loc[(cmp_id, 'Time'), f'DS{DS_i}-Theta_0'] = LF_data[