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

Zoisite Say R. & Izzy B. #18

Open
wants to merge 27 commits into
base: main
Choose a base branch
from
Open

Zoisite Say R. & Izzy B. #18

wants to merge 27 commits into from

Conversation

LRyder17
Copy link

No description provided.

Copy link

@kelsey-steven-ada kelsey-steven-ada left a comment

Choose a reason for hiding this comment

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

Great work on waves 1 and 2 for Solar System, Say & Izzy! It looks like you've got a handle on creating a blueprint, registering it with your Flask app, and writing routes. I like the code refactors so that the routes can stay short and sweet!

app/routes.py Outdated
Comment on lines 30 to 33
result_list = []

for planet in planets:
result_list.append(planet.planet_to_dict())

Choose a reason for hiding this comment

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

This would be a good candidate for a list comprehension, what could that look like?

app/routes.py Outdated
Comment on lines 49 to 52
@planets_bp.route("/<id>", methods=["GET"])
def handle_planet(id):
planet = validate_planet(id)
return planet.planet_to_dict()

Choose a reason for hiding this comment

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

It's not a rule and the code still executes just fine, but usually we'd see all the routes grouped together and all the helpers methods grouped together in a file.

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.

3 participants