From c8fa61e2446d26021773fc5a4a2f20f32af4562b Mon Sep 17 00:00:00 2001 From: Fabian Date: Tue, 7 Mar 2023 18:22:07 +0100 Subject: [PATCH] Snakefile: replace else statements by if statement to satisfy snakefmt --- Snakefile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Snakefile b/Snakefile index 935cf241..b75a9126 100644 --- a/Snakefile +++ b/Snakefile @@ -786,7 +786,8 @@ if config["sector"]["gas_network"] or config["sector"]["H2_retrofit"]: **rules.build_gas_input_locations.output, } -else: +if not (config["sector"]["gas_network"] or config["sector"]["H2_retrofit"]): +# this is effecively an `else` statement which is however not liked by snakefmt gas_infrastructure = {} @@ -951,8 +952,9 @@ if config["sector"]["biomass_transport"]: build_biomass_transport_costs_output = rules.build_biomass_transport_costs.output +if not config["sector"]["biomass_transport"]: +# this is effecively an `else` statement which is however not liked by snakefmt -else: build_biomass_transport_costs_output = {} @@ -982,7 +984,8 @@ if config["sector"]["regional_co2_sequestration_potential"]["enable"]: build_sequestration_potentials_output = rules.build_sequestration_potentials.output -else: +if not config["sector"]["regional_co2_sequestration_potential"]["enable"]: +# this is effecively an `else` statement which is however not liked by snakefmt build_sequestration_potentials_output = {} @@ -1188,7 +1191,8 @@ if config["sector"]["retrofitting"]["retro_endogen"]: build_retro_cost_output = rules.build_retro_cost.output -else: +if not config["sector"]["retrofitting"]["retro_endogen"]: +# this is effecively an `else` statement which is however not liked by snakefmt build_retro_cost_output = {}