Skip to content

Commit

Permalink
Lint code.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioannis-vm committed May 19, 2024
1 parent 715df6f commit 51f6626
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions pelicun/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'][
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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[
Expand Down

0 comments on commit 51f6626

Please sign in to comment.