From 8ed2e31150409007789c4f296f18debee3d60021 Mon Sep 17 00:00:00 2001 From: romainsacchi Date: Thu, 27 Jul 2023 14:47:50 +0000 Subject: [PATCH] Black reformating --- premise/ecoinvent_modification.py | 5 ++++- premise/electricity.py | 4 ++-- premise/export.py | 7 +------ setup.py | 2 +- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/premise/ecoinvent_modification.py b/premise/ecoinvent_modification.py index dde71d6c..1e91d767 100644 --- a/premise/ecoinvent_modification.py +++ b/premise/ecoinvent_modification.py @@ -1122,7 +1122,10 @@ def update_all(self) -> None: self.update_emissions() def write_superstructure_db_to_brightway( - self, name: str = f"super_db_{date.today()}", filepath: str = None, format: str = "excel" + self, + name: str = f"super_db_{date.today()}", + filepath: str = None, + format: str = "excel", ) -> None: """ Register a super-structure database, diff --git a/premise/electricity.py b/premise/electricity.py index 8568105a..ab0a33cc 100644 --- a/premise/electricity.py +++ b/premise/electricity.py @@ -1435,7 +1435,8 @@ def create_biomass_markets(self) -> None: } available_biomass_vars = [ - v for v in list(biomass_map.keys()) + v + for v in list(biomass_map.keys()) if v in self.iam_data.production_volumes.variables.values ] @@ -1453,7 +1454,6 @@ def create_biomass_markets(self) -> None: ) if biomass_type in available_biomass_vars: - share = np.clip( ( self.iam_data.production_volumes.sel( diff --git a/premise/export.py b/premise/export.py index 7e4acfcf..5a573639 100644 --- a/premise/export.py +++ b/premise/export.py @@ -827,12 +827,7 @@ def generate_scenario_difference_file( def generate_superstructure_db( - origin_db, - scenarios, - db_name, - filepath, - version, - format="excel" + origin_db, scenarios, db_name, filepath, version, format="excel" ) -> List[dict]: """ Build a superstructure database from a list of databases diff --git a/setup.py b/setup.py index b156350d..847d9e5a 100644 --- a/setup.py +++ b/setup.py @@ -58,7 +58,7 @@ def package_files(directory): "requests", "bottleneck", "constructive_geometries>=0.8.2", - "pyarrow" + "pyarrow", ], url="https://github.com/polca/premise", description="Coupling IAM output to ecoinvent LCA database ecoinvent for prospective LCA",