From b7c58883b7cf2279f638c450e12bfa920221d785 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 6 Mar 2023 16:19:23 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- scripts/add_existing_baseyear.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/add_existing_baseyear.py b/scripts/add_existing_baseyear.py index 60974362..e13c27ca 100644 --- a/scripts/add_existing_baseyear.py +++ b/scripts/add_existing_baseyear.py @@ -160,7 +160,10 @@ def add_power_capacities_installed_before_baseyear(n, grouping_years, costs, bas mean = df_agg.loc[biomass_i, "DateIn"].mean() df_agg.loc[biomass_i, "DateIn"] = df_agg.loc[biomass_i, "DateIn"].fillna(int(mean)) # Fill missing DateOut - dateout = df_agg.loc[biomass_i, "DateIn"] + snakemake.config["costs"]['fill_values']["lifetime"] + dateout = ( + df_agg.loc[biomass_i, "DateIn"] + + snakemake.config["costs"]["fill_values"]["lifetime"] + ) df_agg.loc[biomass_i, "DateOut"] = df_agg.loc[biomass_i, "DateOut"].fillna(dateout) # drop assets which are already phased out / decommissioned @@ -654,7 +657,7 @@ if __name__ == "__main__": .to_pandas() .reindex(index=n.snapshots) ) - default_lifetime = snakemake.config["costs"]['fill_values']["lifetime"] + default_lifetime = snakemake.config["costs"]["fill_values"]["lifetime"] add_heating_capacities_installed_before_baseyear( n, baseyear,