Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Person Class #857

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

Volokitin-Vitaliy
Copy link

No description provided.

Copy link

@vsmutok vsmutok left a comment

Choose a reason for hiding this comment

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

Please fix tests

Copy link
Author

@Volokitin-Vitaliy Volokitin-Vitaliy left a comment

Choose a reason for hiding this comment

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

fix

@Volokitin-Vitaliy
Copy link
Author

Can you check?

app/main.py Outdated
person_instance = Person(name, age)
person_list.append(person_instance)

for dct in people:

Choose a reason for hiding this comment

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

dct is not a descriptive variable name

app/main.py Outdated
for dct in people:
obj = Person.people[dct.get("name")]
if "wife" in dct:
if dct["wife"]:

Choose a reason for hiding this comment

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

use get() method instead of two if conditions

app/main.py Outdated
name = person_info["name"]
age = person_info["age"]
person_instance = Person(name, age)
person_list.append(person_instance)

Choose a reason for hiding this comment

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

use list comprehension

app/main.py Outdated
Comment on lines 15 to 16
Person(person_info["name"],
person_info["age"]) for person_info in people
Copy link

Choose a reason for hiding this comment

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

Suggested change
Person(person_info["name"],
person_info["age"]) for person_info in people
Person(person_info["name"], person_info["age"])
for person_info in people

app/main.py Outdated
]

for person_data in people:
obj = Person.people.get(person_data.get("name"))
Copy link

Choose a reason for hiding this comment

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

obj is not clear name

Copy link
Contributor

@viktoria-rybenchuk viktoria-rybenchuk left a comment

Choose a reason for hiding this comment

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

GJ!

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.

4 participants