Skip to content

Commit

Permalink
black: Remove unnecessary blank lines in multiple files
Browse files Browse the repository at this point in the history
Various files across the project had unnecessary blank lines which have been removed in this commit. These changes make the code more concise and easy to read. It's a part of making the code adhere to best coding practices for readability.
  • Loading branch information
jm-rivera committed Dec 11, 2023
1 parent fa69631 commit 9e43abc
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 7 deletions.
1 change: 0 additions & 1 deletion bblocks/import_tools/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ def get_data(self, indicators: str | list = "all", **kwargs) -> pd.DataFrame:
indicators_ = self._data.values()

if isinstance(indicators, list):

for _ in indicators:
if _ not in self._data:
logger.warning(f"{_} not loaded or is an invalid indicator.")
Expand Down
3 changes: 0 additions & 3 deletions bblocks/import_tools/ilo.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,10 @@ def load_data(self, indicator: str | list) -> ImportData:
indicator = [indicator]

for ind in indicator: # loop through indicators

path = BBPaths.raw_data / f"{ind}.csv"

# download data if not saved to disk
if not path.exists():

# download glossaries if not loaded to object
if self._glossaries is None:
self._load_glossaries()
Expand Down Expand Up @@ -245,7 +243,6 @@ def update_data(self, reload_data: bool = True) -> ImportData:
self._load_area_dict()

for ind in self._data: # loop through loaded indicators

# download data
download_data(
ind, BBPaths.raw_data / f"{ind}.csv", self._glossaries, self._area_dict
Expand Down
1 change: 0 additions & 1 deletion bblocks/other_tools/dictionaries.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ def update_dictionaries() -> None:


def g20_countries() -> dict:

return Dict(
{
x: convert(x, src="ISO3", to="name_short", not_found=None)
Expand Down
2 changes: 0 additions & 2 deletions tests/test_dataframe_tools/test_df_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@


def test__get_wb_ind():

data = __get_wb_ind(
ind_code="SP.POP.TOTL", ind_name="test_population", update=False, mrnev=False
)
Expand All @@ -23,7 +22,6 @@ def test__get_wb_ind():


def test_get_population_df():

data = get_population_df(most_recent_only=True, update=False)

assert list(data.columns) == ["year", "iso_code", "population"]
Expand Down

0 comments on commit 9e43abc

Please sign in to comment.