Skip to content

TASK: Add age_up method (#51)#68

Closed
Aliipou wants to merge 2 commits intoTheGittyPerson:mainfrom
Aliipou:feature/age-up-method
Closed

TASK: Add age_up method (#51)#68
Aliipou wants to merge 2 commits intoTheGittyPerson:mainfrom
Aliipou:feature/age-up-method

Conversation

@Aliipou
Copy link
Copy Markdown

@Aliipou Aliipou commented Mar 22, 2026

Summary

Adds an age_up() method to the Person class.

Changes

  • Added Person.age_up() method with type hints and docstring
  • increment parameter defaults to 1 (must be int)
  • Optional height_increment parameter to increase height simultaneously
  • check_birthday parameter (defaults to True) raises ValueError when today is not the person’s birthday
  • Follows PEP 8 style and matches existing code conventions

Closes #51

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
@TheGittyPerson TheGittyPerson added feature New feature or enhancement task This is a task issue / PR completing a task labels Mar 23, 2026
Signed-off-by: Morpheus <167074500+thegittyperson@users.noreply.github.com>
Copy link
Copy Markdown
Owner

@TheGittyPerson TheGittyPerson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! Here is just a tiny suggestion before we merge — let me know what you think.

Comment thread theperson/person.py
Args:
increment: How many years to add to the person's age.
Defaults to 1.
height_increment: Optional amount (in metres) to increase
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@TheGittyPerson
Copy link
Copy Markdown
Owner

TheGittyPerson commented Mar 29, 2026

@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)

@TheGittyPerson
Copy link
Copy Markdown
Owner

@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.

@TheGittyPerson
Copy link
Copy Markdown
Owner

Please open a new PR when you're back, addressing my review comments. Thanks for your engagement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or enhancement task This is a task issue / PR completing a task

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TASK: Add age_up method

2 participants