Skip to content

London | 26-SDC-March | Zobeir Rigi | Sprint 4 | Implement shell tools python#524

Closed
Zobeir-Rigi wants to merge 10 commits into
CodeYourFuture:mainfrom
Zobeir-Rigi:implement-shell-tools-python
Closed

London | 26-SDC-March | Zobeir Rigi | Sprint 4 | Implement shell tools python#524
Zobeir-Rigi wants to merge 10 commits into
CodeYourFuture:mainfrom
Zobeir-Rigi:implement-shell-tools-python

Conversation

@Zobeir-Rigi

Copy link
Copy Markdown

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

@Zobeir-Rigi Zobeir-Rigi added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label May 19, 2026

@LonMcGregor LonMcGregor left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good start, but there is some work left to do here.

Is there a package you could use to help with managing arguments? Right now it is a bit complex, and you can't combine single-letter arguments like the command line tools.

Comment thread implement-shell-tools/ls/ls.py Outdated
elif arg != "-1":
path = arg

files = os.listdir(path)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Part of this task is to see if you can handle the listing yourself.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Got it, added sorting to improve the listing.

Comment thread implement-shell-tools/ls/ls.py Outdated
if arg == "-a":
show_all = True

elif arg != "-1":

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is there any difference between when -1 is used and when not?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Thank you, there wasn’t any difference before. I’ve now handled -1 explicitly.

@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 Jun 3, 2026
@LonMcGregor

Copy link
Copy Markdown
Contributor

See my comments for the node.js version of this task - consider how to fully implement -1 and maybe use an argument parsing library

@Zobeir-Rigi

Copy link
Copy Markdown
Author

Good start, but there is some work left to do here.

Is there a package you could use to help with managing arguments? Right now it is a bit complex, and you can't combine single-letter arguments like the command line tools.

Thanks — I’ve updated it to use argparse, which simplifies argument handling and supports combined flags

@LonMcGregor LonMcGregor left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good work. The main parts of this task are implemented and complete. If you want a stretch goal, you can take some extra time to conver the other parts to use argparse.

@LonMcGregor LonMcGregor added Complete Volunteer to add when work is complete and all review comments have been addressed. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels Jun 30, 2026
@Zobeir-Rigi

Copy link
Copy Markdown
Author

Good work. The main parts of this task are implemented and complete. If you want a stretch goal, you can take some extra time to conver the other parts to use argparse.

Great, I will do it as soon as I get some time.

@illicitonion

Copy link
Copy Markdown
Member

Closing PR because the SDC run has finished. Feel free to re-open if you're still working on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Complete Volunteer to add when work is complete and all review comments have been addressed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants