Conversation
Add age_up() method that increases the person's age by a given increment. Supports optional height_increment and check_birthday parameter that validates today matches the person's birthday. Closes TheGittyPerson#51
Signed-off-by: Morpheus <167074500+thegittyperson@users.noreply.github.com>
TheGittyPerson
left a comment
There was a problem hiding this comment.
Thanks for the PR! Here is just a tiny suggestion before we merge — let me know what you think.
| Args: | ||
| increment: How many years to add to the person's age. | ||
| Defaults to 1. | ||
| height_increment: Optional amount (in metres) to increase |
There was a problem hiding this comment.
Might want to add a check for height_increment that raises a ValueError to prevent negative increments.
Also perhaps a type check for height_increment
|
@Aliipou Hello! Here's a friendly reminder that it's been almost a week since my review of your PR. If you're having trouble fixing the issues, please let me know (if you're busy I totally understand) |
|
@Aliipou I will be closing this PR soon as I don't see any response to my reviews. Please tag me once you're back on this. Friendly reminder, AI is highly discouraged here. |
|
Please open a new PR when you're back, addressing my review comments. Thanks for your engagement. |
Summary
Adds an
age_up()method to thePersonclass.Changes
Person.age_up()method with type hints and docstringincrementparameter defaults to1(must beint)height_incrementparameter to increase height simultaneouslycheck_birthdayparameter (defaults toTrue) raisesValueErrorwhen today is not the person’s birthdayCloses #51