Skip to content

Conversation

0x1za
Copy link
Contributor

@0x1za 0x1za commented Jun 18, 2020

Specifying the same flag name twice will raise a RuntimeError.

@click.option( "--foo/--foo", default=False)

fixes #1465

@0x1za

This comment has been minimized.

@davidism davidism added this to the 8.0.0 milestone Jun 25, 2020
@davidism davidism force-pushed the duplicate-boolean-flags branch from 09ea9df to 7de4708 Compare June 25, 2020 04:53
@davidism davidism changed the title raise warning for duplicate flags raise ValueError for duplicate flags Jun 25, 2020
@davidism
Copy link
Member

Squashed, rebased, added changelog, reverted changes to requirements/tests.txt, raised ValueError instead of TypeError.

@davidism davidism merged commit dfb842d into pallets:master Jun 25, 2020
@davidism davidism deleted the duplicate-boolean-flags branch June 25, 2020 04:56
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Duplicate Boolean flag options "--foo/--foo" are not detected (defaults to False)
2 participants