Skip to content

Conversation

@DoonThousand
Copy link

No description provided.

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

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

Review Summary

Your solution is functionally correct and meets most of the requirements, which is great work! However, a couple of changes are needed to align with the project's coding standards.

The implementation currently uses a for loop to create the Person instances. This should be refactored into a list comprehension as required by the checklist [CHECKLIST ITEM #3]. Additionally, the variable i used in the loops is not descriptive. Please rename it to something more meaningful, like person_data, to improve readability [CHECKLIST ITEM #1].

Once these adjustments are made, your solution will be ready for approval.


✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨

Important

Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.

Tip

If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.

Caution

Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.

Footnotes

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

app/main.py Outdated
# write your code here
pass
Person.people.clear()
for i in people:

Choose a reason for hiding this comment

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

This violates checklist item #1: 'Use descriptive and correct variable names.' The variable i is not descriptive of the data it holds (a dictionary representing a person). A name like person_data or person_dict would be more meaningful. This feedback also applies to the loop on line 18.

app/main.py Outdated
Comment on lines 13 to 16
for i in people:
name = i["name"]
age = i["age"]
Person(name, age)

Choose a reason for hiding this comment

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

This loop violates checklist item #3, which states: 'When creating a list of instances from a collection (such as a list of dictionaries), it is recommended to use list comprehension rather than traditional for loops.' You can replace this entire loop with a single list comprehension to create the Person objects.

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

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

Review Summary

Great work on this iteration! I am approving your solution. You've successfully addressed all the previous feedback by refactoring the loop into a clean list comprehension and using more descriptive variable names. The code is now much more readable and fully compliant with all project requirements. Well done!


✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨

Footnotes

  1. Rate AI review example

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants