Skip to content

Be slightly less aggro about parser ambiguity wrt optional-value flags #516

@bitprophet

Description

@bitprophet

Spinoff from #33, specifically #33 (comment)

Marking as bug but it's one of those things I'd only want to release in a minor release...esp as it's backwards incompatible. (Soon, so soon, this would be grounds for a major release! but we're still pre 1.0...)

tl;dr try reining in Parser.check_ambiguity() so it doesn't explode when the value given is flag-like, but it would be a valid flag for the current context: it seems more likely that the user was intending to give that 2nd flag (and implicitly NOT giving a value to the optional-value flag being parsed), than that they were intending to give such a flag as a value to this one.

We might also want to remove the check around another possible context/task name, but that one seems more truly ambiguous to me so prob best to leave it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions