diff --git a/premise/wind_turbines.py b/premise/wind_turbines.py index c55e3b39..80c72b7c 100644 --- a/premise/wind_turbines.py +++ b/premise/wind_turbines.py @@ -37,16 +37,16 @@ def _update_wind_turbines(scenario, version, system_model): def relink( - dataset, + dataset, ) -> dict: """ Relink technosphere exchanges to the new datasets. """ for exc in ws.technosphere( - dataset, + dataset, ws.equals("unit", "unit"), - ws.exclude(ws.contains("name", "connection")) + ws.exclude(ws.contains("name", "connection")), ): exc["name"] += ", direct drive" @@ -106,13 +106,8 @@ def create_direct_drive_turbines(self): new_datasets, processed = [], [] for dataset in ws.get_many( self.database, - ws.either( - *[ - ws.contains("name", tech) - for tech in datasets_terms - ] - ), - ws.exclude(ws.contains("name", "direct drive")) + ws.either(*[ws.contains("name", tech) for tech in datasets_terms]), + ws.exclude(ws.contains("name", "direct drive")), ): if dataset["code"] not in processed: dataset_copy = self.create_dataset_copy(dataset, "direct drive")