Skip to content

Commit

Permalink
fix date of birth type in calculate_weeks
Browse files Browse the repository at this point in the history
  • Loading branch information
kronicka committed Jan 1, 2019
1 parent 3d7eac0 commit 6740d51
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,14 @@ def draw_text(img: Image) -> None:
# img.save('weeks.png')


def calculate_weeks(sex: bool, country_index: int, *dob: int) -> int:
def calculate_weeks(sex: bool, country_index: int, dob: Tuple[int, int, int]) -> int:
"""
Calculate the number of weeks left to live based on date of birth
Params:
sex (bool): biological sex, False for male, True for female
country_index (int): number of years of life expectancy by country
*dob (int): year, month, day of birth, in that order
dob (Tuple[int, int, int]): year, month, day of birth, in that order
Returns:
weeks_left (int): projected number of weeks left to live
Expand Down

0 comments on commit 6740d51

Please sign in to comment.