Skip to content

Is there a way to disable positional arguments altogether ? #1095

Answered by phlptp
aphecetche asked this question in Q&A
Discussion options

You must be logged in to vote

The first could be achieved by wrapping the add_option call and doing the check there or probably slightly less complicated would be using the get_options(filter) method with a filter that selects options with the get_positional() check. If that list is not empty throw an error. That could be done in a method that operates on an app and does the check.

Curious what the use case for not allowing positionals in that manner is?

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@aphecetche
Comment options

@phlptp
Comment options

Answer selected by aphecetche
@aphecetche
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants