Skip to content

Conversation

@HassanOHOsman
Copy link

Self checklist

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the style guide

In this PR I Implemented a command-line tool using the cowsay library with dynamic animal options, message input, validation, and proper --help output.

@HassanOHOsman HassanOHOsman added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. 📅 Sprint 4 Assigned during Sprint 4 of this module labels Nov 30, 2025
@LonMcGregor LonMcGregor added the Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. label Dec 23, 2025
@LonMcGregor
Copy link

Can you ignore the .venv file? It is difficult to review this as there are too many files in the PR. thanks

@LonMcGregor LonMcGregor added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Dec 23, 2025
@HassanOHOsman HassanOHOsman added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels Jan 9, 2026
@HassanOHOsman
Copy link
Author

Can you ignore the .venv file? It is difficult to review this as there are too many files in the PR. thanks

Hi! I've just ignored it. Please let me know if there's anything else needs changing. Appreciate your help! :)

Copy link

@LonMcGregor LonMcGregor left a comment

Choose a reason for hiding this comment

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

Good start, i've left some comments where you could improve further

import sys
import argparse

listed_animals = [listed_animal for listed_animal in dir(cowsay) if callable(getattr(cowsay, listed_animal)) and not listed_animal.startswith("__") and listed_animal not in ["draw", "func", "get_output_string", "CowsayError"]]

Choose a reason for hiding this comment

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

This might work, but looking over every single item in dir(cowsay) and manually excluding the ones you dont want might not be very maintainable in the long term. Is there an easier way to access this information?

args = parser.parse_args()

message = " ".join(args.message)
animal = args.animal or "cow"

Choose a reason for hiding this comment

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

You are setting a default argument here which is good, but perhaps there may be a neater way of doing this. Think about where the rest of the arguments are handled.

@LonMcGregor LonMcGregor added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Jan 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Reviewed Volunteer to add when completing a review with trainee action still to take. 📅 Sprint 4 Assigned during Sprint 4 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants