diff --git a/chord_metadata_service/patients/tests/constants.py b/chord_metadata_service/patients/tests/constants.py index 0efa322ed..c05cc4a48 100644 --- a/chord_metadata_service/patients/tests/constants.py +++ b/chord_metadata_service/patients/tests/constants.py @@ -1,4 +1,4 @@ -from typing import Tuple +from typing import Tuple, Optional import uuid import random from datetime import date, timedelta @@ -85,7 +85,7 @@ def generate_random_date(years_from: int, years_to: int): INDIVIDUAL_2_CSV = "patient:2,MALE,1967-01-01,human,UNKNOWN_KARYOTYPE,,,,--IGNORE--,--IGNORE--" -def generate_valid_individual(age=None, age_range=None, gen_random_age: None | Tuple[int, int] = None): +def generate_valid_individual(age=None, age_range=None, gen_random_age: Optional[Tuple[int, int]] = None): if age and age_range: raise ValueError("Cannot use 'age' and 'age_range' simultaneously for Individual.time_at_last_encounter.") individual = {