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

Boolean options should recognize --no- prefix to toggle them #6846

Open
blueyed opened this issue Feb 29, 2020 · 1 comment
Open

Boolean options should recognize --no- prefix to toggle them #6846

blueyed opened this issue Feb 29, 2020 · 1 comment
Labels
topic: config related to config handling, argument parsing and config file type: enhancement new feature or API change, should be merged into features branch

Comments

@blueyed
Copy link
Contributor

blueyed commented Feb 29, 2020

E.g. with --showlocals in addopts it should be possible to use --no-showlocals to disable it for the current run.

This might be achievable in general by extending argparse's action for bools/flags.

@blueyed blueyed added type: enhancement new feature or API change, should be merged into features branch topic: config related to config handling, argument parsing and config file labels Feb 29, 2020
@blueyed blueyed changed the title Boolean options should be recognize --no- prefix to toggle them Boolean options should recognize --no- prefix to toggle them Feb 29, 2020
@blueyed
Copy link
Contributor Author

blueyed commented Mar 1, 2020

Done in blueyed#267.
Let me know if you're interested, and I'll create a PR for it, but should be done after #6817 due to conflicts.

blueyed added a commit to blueyed/pytest that referenced this issue Mar 1, 2020
blueyed added a commit to blueyed/pytest that referenced this issue Mar 1, 2020
@blueyed blueyed closed this as completed Aug 31, 2020
@blueyed blueyed reopened this Aug 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: config related to config handling, argument parsing and config file type: enhancement new feature or API change, should be merged into features branch
Projects
None yet
Development

No branches or pull requests

1 participant