Skip to content

Commit

Permalink
Black reformating
Browse files Browse the repository at this point in the history
  • Loading branch information
romainsacchi committed Apr 11, 2024
1 parent 7ee5e96 commit 1e97b7d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
10 changes: 6 additions & 4 deletions pathways/lca.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"""


import csv
import logging
import uuid
Expand All @@ -16,15 +15,18 @@
import pyprind
from bw2calc import MonteCarloLCA
from bw_processing import Datapackage
from numpy import ndarray, dtype
from numpy import dtype, ndarray
from scipy import sparse
from scipy.sparse import csr_matrix

from .filesystem_constants import DIR_CACHED_DB
from .lcia import fill_characterization_factors_matrices
from .pathways import _group_technosphere_indices
from .utils import get_unit_conversion_factors, fetch_indices, check_unclassified_activities

from .utils import (
check_unclassified_activities,
fetch_indices,
get_unit_conversion_factors,
)

logging.basicConfig(
level=logging.DEBUG,
Expand Down
13 changes: 7 additions & 6 deletions pathways/pathways.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

from .data_validation import validate_datapackage
from .filesystem_constants import DATA_DIR, DIR_CACHED_DB
from .lca import get_lca_matrices, _calculate_year
from .lca import _calculate_year, get_lca_matrices
from .lcia import get_lcia_method_names
from .utils import (
clean_cache_directory,
Expand All @@ -32,7 +32,8 @@
load_classifications,
load_numpy_array_from_disk,
load_units_conversion,
resize_scenario_data, )
resize_scenario_data,
)

# remove warnings
warnings.filterwarnings("ignore")
Expand Down Expand Up @@ -110,9 +111,7 @@ class Pathways:

def __init__(self, datapackage, debug=False):
self.datapackage = datapackage
self.data, dataframe, self.filepaths = validate_datapackage(
_read_datapackage()
)
self.data, dataframe, self.filepaths = validate_datapackage(_read_datapackage())
self.mapping = _get_mapping()
self.mapping.update(self._get_final_energy_mapping())
self.debug = debug
Expand Down Expand Up @@ -176,7 +175,9 @@ def create_dict_for_specific_model(row: dict, model: str) -> dict:
return dict_structure
return None

def create_dict_with_specific_model(dataframe: pandas.DataFrame, model: str) -> dict:
def create_dict_with_specific_model(
dataframe: pandas.DataFrame, model: str
) -> dict:
"""
Create a dictionary for a specific model from the dataframe.
:param dataframe: pandas.DataFrame
Expand Down

0 comments on commit 1e97b7d

Please sign in to comment.