Skip to content

Commit

Permalink
Merge pull request #12 from biomarker-ontology/fix_python_backwards_c…
Browse files Browse the repository at this point in the history
…ompatibility

fix for python < 3.10 compatibility
  • Loading branch information
seankim658 authored Feb 9, 2024
2 parents d51bdfd + 071ddbf commit b491295
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion api/id_assign.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# threshold for updating the local storage replica of the id_map_collection
UPDATE_THRESHOLD = 800

def process_data(data: dict | list, dbh, id_collection: str, filepath: str) -> tuple:
def process_data(data: list, dbh, id_collection: str, filepath: str) -> tuple:
''' Processes the data for ID assignments.
Parameters
Expand Down
4 changes: 2 additions & 2 deletions api/load_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

BATCH_SIZE = 1000

def preprocess_checks(data: dict | list, dbh, db_collection: str) -> bool:
def preprocess_checks(data: list, dbh, db_collection: str) -> bool:
''' Performs preprocessing checks on the data before .
Parameters
Expand All @@ -35,7 +35,7 @@ def preprocess_checks(data: dict | list, dbh, db_collection: str) -> bool:
return False
return True

def process_data(data: dict | list, dbh, db_collection: str, fp: str) -> bool:
def process_data(data: list, dbh, db_collection: str, fp: str) -> bool:
''' Inserts the data into the prd database.
Parameters
Expand Down
4 changes: 2 additions & 2 deletions api/misc_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import pymongo
import subprocess

def load_json(filepath: str) -> dict | list:
def load_json(filepath: str) -> list:
''' Loads a JSON file.
Parameters
Expand All @@ -21,7 +21,7 @@ def load_json(filepath: str) -> dict | list:
json_obj = json.load(f)
return json_obj

def write_json(filepath: str, data: dict | list) -> None:
def write_json(filepath: str, data: list) -> None:
''' Writes a JSON file.
Parameters
Expand Down

0 comments on commit b491295

Please sign in to comment.