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

All basic commands should accept file names or a flag --all #5

Closed
StephanLoor opened this issue Jul 17, 2024 · 3 comments
Closed

All basic commands should accept file names or a flag --all #5

StephanLoor opened this issue Jul 17, 2024 · 3 comments

Comments

@StephanLoor
Copy link
Contributor

StephanLoor commented Jul 17, 2024

My idea is to fix two "issues" at the same time:

  1. At present, diff and clean can only be applied to all files at once, i.e. they cannot be applied to individual files.
  2. There are two separate commands fix and fix_all, even though the latter really just applies the former to every .rej file present.

My proposal would be to do the following:

  1. Add an optional flag --all to the fix command, and make the input variable rej_file_path optional (with default value ''). Typer can be used to implement this.
  2. If the flag --all passed, run what is currently fix_all.
  3. Remove fix_all as a separate command.
  4. If --all is not passed, check if rej_file_path == ''. If this is the case, then raise an error. Otherwise, apply the current fix command.
  5. Apply the same logic to diff and clean.

@MarkusSagen if you like these ideas, I can have a go at implementing them myself 😄

@MarkusSagen
Copy link
Owner

MarkusSagen commented Jul 18, 2024

💯 Great suggestion! It was not the ideal flow for implementing this before and I think the proposed change is what it should have been from the beginning

@StephanLoor, if you would like to take a stab at it, that would be much appreciated 😃

@StephanLoor
Copy link
Contributor Author

Closed as completed in #6

@MarkusSagen
Copy link
Owner

Included in the 0.2.0 release

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

No branches or pull requests

2 participants