From 30ccde5b908aa680ea858fcdb08b09b593e901cf Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 25 Jan 2024 19:39:07 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- rules/postprocess.smk | 2 -- scripts/plot_gas_network.py | 5 +++-- scripts/plot_hydrogen_network.py | 6 +++--- scripts/plot_power_network.py | 3 ++- scripts/plot_power_network_perfect.py | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/rules/postprocess.smk b/rules/postprocess.smk index 22cefcbd..f7c50733 100644 --- a/rules/postprocess.smk +++ b/rules/postprocess.smk @@ -32,7 +32,6 @@ if config["foresight"] != "perfect": script: "../scripts/plot_power_network.py" - rule plot_hydrogen_network: params: plotting=config["plotting"], @@ -56,7 +55,6 @@ if config["foresight"] != "perfect": script: "../scripts/plot_hydrogen_network.py" - rule plot_gas_network: params: plotting=config["plotting"], diff --git a/scripts/plot_gas_network.py b/scripts/plot_gas_network.py index a72c5c56..cd515e96 100644 --- a/scripts/plot_gas_network.py +++ b/scripts/plot_gas_network.py @@ -3,7 +3,8 @@ # # SPDX-License-Identifier: MIT """ -Creates map of optimised gas network, storage and selected other infrastructure. +Creates map of optimised gas network, storage and selected other +infrastructure. """ import logging @@ -13,8 +14,8 @@ import matplotlib.pyplot as plt import pandas as pd import pypsa from _helpers import configure_logging -from pypsa.plot import add_legend_circles, add_legend_lines, add_legend_patches from plot_power_network import assign_location, load_projection +from pypsa.plot import add_legend_circles, add_legend_lines, add_legend_patches logger = logging.getLogger(__name__) diff --git a/scripts/plot_hydrogen_network.py b/scripts/plot_hydrogen_network.py index 13728553..a1183311 100644 --- a/scripts/plot_hydrogen_network.py +++ b/scripts/plot_hydrogen_network.py @@ -3,7 +3,8 @@ # # SPDX-License-Identifier: MIT """ -Creates map of optimised hydrogen network, storage and selected other infrastructure. +Creates map of optimised hydrogen network, storage and selected other +infrastructure. """ import logging @@ -13,9 +14,8 @@ import matplotlib.pyplot as plt import pandas as pd import pypsa from _helpers import configure_logging -from pypsa.plot import add_legend_circles, add_legend_lines, add_legend_patches - from plot_power_network import assign_location, load_projection +from pypsa.plot import add_legend_circles, add_legend_lines, add_legend_patches logger = logging.getLogger(__name__) diff --git a/scripts/plot_power_network.py b/scripts/plot_power_network.py index 48aa01e3..271e638d 100644 --- a/scripts/plot_power_network.py +++ b/scripts/plot_power_network.py @@ -14,12 +14,13 @@ import geopandas as gpd import matplotlib.pyplot as plt import pandas as pd import pypsa -from plot_summary import preferred_order, rename_techs from _helpers import configure_logging +from plot_summary import preferred_order, rename_techs from pypsa.plot import add_legend_circles, add_legend_lines, add_legend_patches logger = logging.getLogger(__name__) + def rename_techs_tyndp(tech): tech = rename_techs(tech) if "heat pump" in tech or "resistive heater" in tech: diff --git a/scripts/plot_power_network_perfect.py b/scripts/plot_power_network_perfect.py index ce8afef0..ff576d33 100644 --- a/scripts/plot_power_network_perfect.py +++ b/scripts/plot_power_network_perfect.py @@ -14,9 +14,9 @@ import matplotlib.pyplot as plt import pandas as pd import pypsa from _helpers import configure_logging -from pypsa.plot import add_legend_circles, add_legend_lines -from plot_power_network import assign_location, rename_techs_tyndp, load_projection +from plot_power_network import assign_location, load_projection, rename_techs_tyndp from plot_summary import preferred_order +from pypsa.plot import add_legend_circles, add_legend_lines logger = logging.getLogger(__name__)