Merge pull request #2825 from MrQubo/allow-off-as-falsy

Allow 'off' as falsy value
This commit is contained in:
Anthony Scopatz 2018-09-21 09:15:25 -04:00 committed by GitHub
commit e92cb2ee81
Failed to generate hash of commit
2 changed files with 14 additions and 1 deletions

View file

@ -0,0 +1,13 @@
**Added:**
* 'off' can be passed as falsy value to all flags accepting boolean argument.
**Changed:** None
**Deprecated:** None
**Removed:** None
**Fixed:** None
**Security:** None

View file

@ -1185,7 +1185,7 @@ def logfile_opt_to_str(x):
_FALSES = LazyObject(
lambda: frozenset(["", "0", "n", "f", "no", "none", "false"]), globals(), "_FALSES"
lambda: frozenset(["", "0", "n", "f", "no", "none", "false", "off"]), globals(), "_FALSES"
)