Skip to content

Commit

Permalink
Resolve util func naming discrepancy
Browse files Browse the repository at this point in the history
  • Loading branch information
cmutel authored and jsvgoncalves committed Nov 8, 2024
1 parent f160f82 commit e39758f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions bw2data/backends/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
from bw2data.backends.utils import (
check_exchange,
dict_as_activitydataset,
_dict_as_exchangedataset,
dict_as_exchangedataset,
get_csv_data_dict,
retupleize_geo_strings,
)
Expand Down Expand Up @@ -525,7 +525,7 @@ def _efficient_write_dataset(

if "output" not in exchange:
exchange["output"] = (ds["database"], ds["code"])
exchanges.append(_dict_as_exchangedataset(exchange))
exchanges.append(dict_as_exchangedataset(exchange))

# Query gets passed as INSERT INTO x VALUES ('?', '?'...)
# SQLite3 has a limit of 999 variables,
Expand Down
4 changes: 2 additions & 2 deletions bw2data/backends/proxies.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
check_exchange_keys,
check_exchange_type,
)
from bw2data.backends.utils import dict_as_activitydataset, _dict_as_exchangedataset
from bw2data.backends.utils import dict_as_activitydataset, dict_as_exchangedataset
from bw2data.configuration import labels
from bw2data.errors import ValidityError
from bw2data.logs import stdout_feedback_logger
Expand Down Expand Up @@ -574,7 +574,7 @@ def save(self, signal: bool = True, data_already_set: bool = False, force_insert
check_exchange_type(self._data.get("type"))
check_exchange_keys(self)

for key, value in _dict_as_exchangedataset(self._data).items():
for key, value in dict_as_exchangedataset(self._data).items():
setattr(self._document, key, value)

self._document.save(signal=signal, force_insert=force_insert)
Expand Down
2 changes: 1 addition & 1 deletion bw2data/backends/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def dict_as_activitydataset(ds: Any, add_snowflake_id: bool = False) -> dict:
return val


def _dict_as_exchangedataset(ds: Any) -> dict:
def dict_as_exchangedataset(ds: Any) -> dict:
return {
"data": ds,
"input_database": ds["input"][0],
Expand Down

0 comments on commit e39758f

Please sign in to comment.