From 54e0db0f1236e728195bf38a68c18123132d9db1 Mon Sep 17 00:00:00 2001 From: Ben Elliston Date: Thu, 24 Oct 2024 16:30:53 +1100 Subject: [PATCH] Properly sort imports this time! --- nemo/scenarios.py | 30 ++++++------------------------ tests/test_context.py | 3 ++- tests/test_generators.py | 4 ++-- tests/test_nem.py | 4 ++-- tests/test_penalties.py | 3 ++- tests/test_sim.py | 1 + tests/test_storage.py | 1 + tests/test_utils.py | 1 + 8 files changed, 17 insertions(+), 30 deletions(-) diff --git a/nemo/scenarios.py b/nemo/scenarios.py index b20aff7f..45ba3a7e 100644 --- a/nemo/scenarios.py +++ b/nemo/scenarios.py @@ -11,30 +11,12 @@ """Supply side scenarios.""" from nemo import configfile, regions -from nemo.generators import ( - CCGT, - CCGT_CCS, - CST, - OCGT, - Biofuel, - Black_Coal, - CentralReceiver, - Coal_CCS, - DemandResponse, - Hydro, - PumpedHydroPump, - PumpedHydroTurbine, - PV1Axis, - Wind, - WindOffshore, -) -from nemo.polygons import ( - WILDCARD, - cst_limit, - offshore_wind_limit, - pv_limit, - wind_limit, -) +from nemo.generators import (CCGT, CCGT_CCS, CST, OCGT, Biofuel, Black_Coal, + CentralReceiver, Coal_CCS, DemandResponse, Hydro, + PumpedHydroPump, PumpedHydroTurbine, PV1Axis, + Wind, WindOffshore) +from nemo.polygons import (WILDCARD, cst_limit, offshore_wind_limit, pv_limit, + wind_limit) from nemo.storage import PumpedHydroStorage from nemo.types import UnreachableError diff --git a/tests/test_context.py b/tests/test_context.py index 64f5b92c..a0438388 100644 --- a/tests/test_context.py +++ b/tests/test_context.py @@ -9,9 +9,10 @@ import unittest -import nemo import numpy as np import pandas as pd + +import nemo from nemo import regions diff --git a/tests/test_generators.py b/tests/test_generators.py index d6c64fac..31e47544 100644 --- a/tests/test_generators.py +++ b/tests/test_generators.py @@ -13,10 +13,10 @@ import numpy as np import pandas as pd -from nemo import costs, generators, storage - import tcpserver +from nemo import costs, generators, storage + PORT = 9998 battery_storage = storage.BatteryStorage(800, "Li-ion store") hydrogen_storage = storage.HydrogenStorage(1000, "H2 store") diff --git a/tests/test_nem.py b/tests/test_nem.py index 5078ad0a..d6e3576b 100644 --- a/tests/test_nem.py +++ b/tests/test_nem.py @@ -11,10 +11,10 @@ import importlib import unittest -from nemo import nem - import tcpserver +from nemo import nem + PORT = 9998 diff --git a/tests/test_penalties.py b/tests/test_penalties.py index f5dd642e..2c9c2a81 100644 --- a/tests/test_penalties.py +++ b/tests/test_penalties.py @@ -11,8 +11,9 @@ import unittest -import nemo import numpy as np + +import nemo from nemo import generators, penalties, regions, storage from nemo.penalties import reasons from nemo.polygons import WILDCARD diff --git a/tests/test_sim.py b/tests/test_sim.py index 78721749..4a2a9ddd 100644 --- a/tests/test_sim.py +++ b/tests/test_sim.py @@ -13,6 +13,7 @@ import numpy as np import pandas as pd + from nemo import configfile, generators, sim, storage from nemo.context import Context diff --git a/tests/test_storage.py b/tests/test_storage.py index d1df21a6..006c36af 100644 --- a/tests/test_storage.py +++ b/tests/test_storage.py @@ -10,6 +10,7 @@ import unittest import pandas as pd + from nemo import configfile, generators, storage from nemo.polygons import WILDCARD diff --git a/tests/test_utils.py b/tests/test_utils.py index f666b21a..b8193ce6 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -15,6 +15,7 @@ from pathlib import Path import pytest + from nemo import context, scenarios, sim, utils