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

Feat: Add flag aliases feature #73

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

oNaiPs
Copy link

@oNaiPs oNaiPs commented Dec 4, 2024

@SupImDos first of all, thanks for such a useful project!

This PR attempts to implement #44.
It seems to have the functionality, however I'd like your guidance regarding next steps:

  • What do you think of the implementation approach?
  • Docs
  • More Tests

Some comments regarding these edge cases:

What happens if you provide alias and aliases?
What is the behaviour for boolean arguments
What is the behaviour for inverted arguments (i.e., --no-<x>)

It seems to me that alias and aliases target different cases. Since alias maps to argparse's dest field, the optional aliases flags you set up would not alter this behavior.
In regards to the boolean option, BooleanOptionalAction should take care of it (if option starts with --, negates)
Finally, regarding inverted arguments, not sure what would be the case here, could you give an example?

Closes #44.

@oNaiPs oNaiPs marked this pull request as draft December 4, 2024 11:52
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

Successfully merging this pull request may close these issues.

Add possiblity to address the same option via several alias names
1 participant