dbader / dbader/pytest-osxnotify

Parameter `--osxnotify` is hard to negate

Open
#10 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
74
Forks
7
PR merge metrics
No merged PRs in 30d

Description

The only way I know to pass `bool(False)` with the current implementation is to pass in an empty string: `osxnotify=''` -- _argparse_ does no implicit cast from `str` to `bool` other than the default Python truth test for empty sequences. So one must either write a `str2bool` function or add a `--no-osxnotify` option, using _argparse.add_argument_'s `action='store_true'` and `action='store_false'`.

Or maybe drop the option altogether and let it be disabled with `-p no:osxnotify` once #9 is fixed.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.