Skip to content

C22 Sphinx Priyanka #2

Open
PriyankaKaramchandani wants to merge 5 commits intoAda-C22:mainfrom
PriyankaKaramchandani:main
Open

C22 Sphinx Priyanka #2
PriyankaKaramchandani wants to merge 5 commits intoAda-C22:mainfrom
PriyankaKaramchandani:main

Conversation

@PriyankaKaramchandani
Copy link

No description provided.

Copy link

@yangashley yangashley left a comment

Choose a reason for hiding this comment

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

Nice work! Waves 1 and 2 look good and the project directory is correctly organized.

You have some inconsistent white spacing and missed some indentations. Be mindful of this so that your code is polished and follows the PEP8 styleguide.

self.name = name
self.description = description
self.distance_from_sun = distance_from_sun

Choose a reason for hiding this comment

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

How would you write the to_dict instance method so you can take an instance of Planet and turn it into a dictionary that will be returned as a response to a client's request?

self.description = description
self.distance_from_sun = distance_from_sun

planets =[

Choose a reason for hiding this comment

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

Suggested change
planets =[
planets = [

Nit: missing whitespace after =

Comment on lines +11 to +17
result_planets.append(
{
"id" : planet.id,
"name": planet.name,
"description" : planet.description,
"distance_from_sun" : planet.distance_from_sun
}

Choose a reason for hiding this comment

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

Inconsistent white spaces

Suggested change
result_planets.append(
{
"id" : planet.id,
"name": planet.name,
"description" : planet.description,
"distance_from_sun" : planet.distance_from_sun
}
result_planets.append(
{
"id": planet.id,
"name": planet.name,
"description": planet.description,
"distance_from_sun": planet.distance_from_sun
}

Comment on lines +40 to +45
return {
"id" : planet.id,
"name" : planet.name,
"description" : planet.description,
"distance_from_sun" : planet.distance_from_sun
}

Choose a reason for hiding this comment

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

Needs one more level of indentation

Suggested change
return {
"id" : planet.id,
"name" : planet.name,
"description" : planet.description,
"distance_from_sun" : planet.distance_from_sun
}
return {
"id" : planet.id,
"name" : planet.name,
"description" : planet.description,
"distance_from_sun" : planet.distance_from_sun
}

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