Skip to content

Conversation

Droid-An
Copy link

@Droid-An Droid-An commented Aug 3, 2025

Learners, PR Template

Self checklist

  • I have committed my files one by one, on purpose, and for a reason
  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • I have tested my changes
  • My changes follow the style guide
  • My changes meet the requirements of this task

Changelist

Implemented shell tools in Python

Questions

what formatter to use for python?

@Droid-An Droid-An added 📅 Sprint 4 Assigned during Sprint 4 of this module Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Aug 3, 2025
@LonMcGregor LonMcGregor added Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Aug 19, 2025
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 on these implementations - I've left a comment on each file with a pointer to show you where you could improve them.

For your question about formatters what do you mean - formatting your code or formatting strings?

  • You can use any code formatter (or none at all), as long as you are consistent with the code you commit
  • Python has a few ways to do string formatting, the newest versions of python have something called "f-strings" that are very powerful, but might take a lot of time to learn fully

for path in args.path:
with open(path) as file:
lines = file.readlines()
line_num = 1

Choose a reason for hiding this comment

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

When printing out the line numbers, compare how the original cat application works to yours. Do you see any discrepancies?

Copy link
Author

Choose a reason for hiding this comment

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

The only discrepancies I see are in spacing. Is that acceptable, provided the output is correct?

path_proceeding(args.path)



Choose a reason for hiding this comment

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

This is a very minor remark, but try not to leave lots of blank lines throughout the file, like here at the end.

Copy link
Author

Choose a reason for hiding this comment

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

Noted, thank you

Choose a reason for hiding this comment

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

Thanks for fixing this

total.append(output.copy())
output.append(path)
string_list = map(str, output)
print(" ".join(string_list))

Choose a reason for hiding this comment

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

Can you see any problem that might happen with the displayed spacing of the output?

Copy link
Author

Choose a reason for hiding this comment

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

honestly, no

@LonMcGregor LonMcGregor added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Aug 19, 2025
@Droid-An Droid-An 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 Aug 20, 2025
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.

  • For cat, try running the original cat program with the -nargument, with multiple files using a wildcard, and then run your own. Can you see any differences?
  • Can you see any issues with the alignment of columns if you run ẁc`with multiple files using a wildcard?

@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 Aug 25, 2025
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