Skip to content

Commit

Permalink
Rename function to make JSON return clearer #43
Browse files Browse the repository at this point in the history
  • Loading branch information
joemull committed Feb 22, 2024
1 parent faff5c3 commit c632ddf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def load_json_with_decimals(file_ref):
)


def open_media_file(filename):
def open_json_media_file(filename):
"""
Opens a JSON file saved as a Janeway media file.
Logs an error if the file is not found.
Expand All @@ -130,7 +130,7 @@ def open_saved_world_bank_data(indicator: str, year: int) -> List:
plugin_settings.SHORT_NAME,
f'{indicator}_{year}.json',
)
return open_media_file(filename)
return open_json_media_file(filename)


def get_abstract_band(size, level, country, currency):
Expand Down Expand Up @@ -280,4 +280,4 @@ def update_demo_band_data():

def get_saved_demo_band_data() -> List:
filename = os.path.join(plugin_settings.SHORT_NAME, DEMO_DATA_FILENAME)
return open_media_file(filename)
return open_json_media_file(filename)

0 comments on commit c632ddf

Please sign in to comment.