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

Deprecate support for is_flag and flag_value parameters #986

Closed
1 task done
svlandeg opened this issue Sep 13, 2024 · 1 comment · Fixed by #987
Closed
1 task done

Deprecate support for is_flag and flag_value parameters #986

svlandeg opened this issue Sep 13, 2024 · 1 comment · Fixed by #987

Comments

@svlandeg
Copy link
Member

Privileged issue

  • I'm @tiangolo or he asked me directly to create an issue here.

Issue Content

Typer's code base currently contains is_flag and flag_value parameters like Click does. However, the current behaviour is inconsistent with Click's behaviour, and not documented.

In discussion with @tiangolo, we've come to the conclusion that these parameters are pretty confusing overall to work with. There are essentially two defaults (one set in code, and one set by flag_value) and then an option to set an arbitrary value to something that is a "flag". We feel that any behaviour obtained by this combination of parameters can probably be achieved easily with some internal logic and more straightforward (and properly typed) options/arguments.

As such, we've decided to remove these options from the code base as they're not really functional right now anyway.

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 a pull request may close this issue.

1 participant