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

Refactor --debug arg declaration to store const #593

Open
shreyb opened this issue Dec 12, 2024 · 0 comments
Open

Refactor --debug arg declaration to store const #593

shreyb opened this issue Dec 12, 2024 · 0 comments
Labels
cleanup General code cleanup and optimization

Comments

@shreyb
Copy link
Collaborator

shreyb commented Dec 12, 2024

action=ConvertDebugToVerbose,

We noticed that there is an action here that that converts --debug to --verbose 1. We probably don't need that. Since in the preceding statement, --verbose is established, with a default of 0, we could probably rewrite --debug as a store_const action, with value 1 and dest="verbose".

See https://github.com/fermitools/Ferry-CLI/blob/master/ferry_cli/helpers/auth.py#L183 for an example of how this could be done.

This would allow us to simplify the code and get rid of a custom action.

@shreyb shreyb added the cleanup General code cleanup and optimization label Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup General code cleanup and optimization
Projects
None yet
Development

No branches or pull requests

1 participant