Skip to content

Commit

Permalink
fix optional type for py 3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
v-rocheleau committed Oct 11, 2023
1 parent 13bfc0d commit 23942b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions chord_metadata_service/patients/tests/constants.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Tuple
from typing import Tuple, Optional
import uuid
import random
from datetime import date, timedelta
Expand Down Expand Up @@ -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 = {
Expand Down

0 comments on commit 23942b5

Please sign in to comment.