Skip to content

Commit 1eb9de7

Browse files
committed
Minor format cleanup for ruff
1 parent f8562a6 commit 1eb9de7

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

src/dscim/utils/rff.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -477,9 +477,7 @@ def aggregate_rff_weights(
477477
# describe and save file
478478
reweighted = reweighted.to_dataset()
479479
reweighted.attrs["version"] = 3
480-
reweighted.attrs[
481-
"description"
482-
] = """
480+
reweighted.attrs["description"] = """
483481
This set of emulator weights is generated using this script:
484482
dscim/dscim/utils/rff.py -> aggregate_rff_weights
485483
It cleans and aggregates the emulator weights csvs, linearly interpolates them between 5 year intervals, reweights them to sum to 1, and converts to ncdf4 format.
@@ -495,9 +493,7 @@ def aggregate_rff_weights(
495493
# describe and save file
496494
error_concatenated = error_concatenated.to_dataset()
497495
error_concatenated.attrs["version"] = 3
498-
error_concatenated.attrs[
499-
"description"
500-
] = """
496+
error_concatenated.attrs["description"] = """
501497
This set of emulator weight errors is generated using this script:
502498
dscim/dscim/preprocessing/rff/aggregate_rff_weights.py
503499
It cleans and aggregates the emulator weights csvs for error rows only, and converts to ncdf4 format.

src/dscim/utils/utils.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -521,9 +521,7 @@ def compute_damages(anomaly, betas, formula):
521521
"gmsl:anomaly"
522522
] * anomaly.temperature * anomaly.gmsl + betas[
523523
"gmsl:np.power(anomaly, 2)"
524-
] * anomaly.gmsl * np.power(
525-
anomaly.temperature, 2
526-
)
524+
] * anomaly.gmsl * np.power(anomaly.temperature, 2)
527525
elif (
528526
formula
529527
== "damages ~ -1 + anomaly + np.power(anomaly, 2) + gmsl + np.power(gmsl, 2)"

0 commit comments

Comments
 (0)