Skip to content

Conversation

@jhill1
Copy link
Owner

@jhill1 jhill1 commented Apr 28, 2025

Nice work; clear code and passes tests (with caveats).

What you did well:

  • clear, easily followed code
  • some nice feature enhancements that were followed through to the tests
  • tests all pass (I think!)

What could be improved:

  • The assessment should have been done in the python directory, rather than move to the main directory; it pollutes the git history
  • There are multiple chnages in a git commit, rather than an atomic change
  • Your tests fail on linux due to the \r\n thing. Worth thinking about how to handle that in future. You can test on linux too...
  • Think about adding comments in places which are non-obvious, e.g. the rstrip.

assert score > 7
assert score > 9

pytest
Copy link
Owner Author

Choose a reason for hiding this comment

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

Don't commit random lines. use git diff to see what will be chnaged

Input - a task to add to the list
Return - nothing
"""
with open (TASK_FILE, "a", encoding="utf-8") as file:
Copy link
Owner Author

Choose a reason for hiding this comment

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

Avoid two functions in one commit. You may want to roll back add_task, but keep list_tasks. You can't do this easily with two functions in one commit.

formatted_tasks.append(f"{index + 1}. {task}")
output_string += "".join(formatted_tasks)
print(output_string)
return output_string.rstrip('\n')
Copy link
Owner Author

Choose a reason for hiding this comment

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

Might need a commetn above this for why the rstrip.



def remove_task(index):

Copy link
Owner Author

Choose a reason for hiding this comment

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

As above; don't add random line in a commit unless they are needed.

@jhill1
Copy link
Owner Author

jhill1 commented Apr 28, 2025

@RoryAlexander1 COmments on the formative above.

@jhill1 jhill1 closed this Apr 28, 2025
@jhill1 jhill1 reopened this May 1, 2025
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