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

Paper - Courtney M #69

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

Conversation

courtneycmassey
Copy link

No description provided.

Copy link

@kaidamasaki kaidamasaki left a comment

Choose a reason for hiding this comment

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

Excellent job!

Your code was really clear and well organized and it seems like you put a lot of thought behind it. Well done!

Comment on lines +12 to +15
def is_complete(self):
if self.completed_at:
return True
return False

Choose a reason for hiding this comment

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

You can simplify this as:

Suggested change
def is_complete(self):
if self.completed_at:
return True
return False
def is_complete(self):
return bool(self.completed_at)

tasks = Task.query.order_by(desc(Task.title))
else:
tasks = Task.query.all()
tasks_response = [task.to_dict() for task in tasks]

Choose a reason for hiding this comment

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

Nice use of a list comprehension here. 😄

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