Skip to content

Commit 39d70aa

Browse files
Merge pull request #135 from labcodes/strtobool-ignore-conversion-when-input-is-a-bool
Change strtobool to ignore the to bool conversion
2 parents aae58b5 + 4903d27 commit 39d70aa

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

decouple.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
FALSE_VALUES = {"n", "no", "f", "false", "off", "0"}
3232

3333
def strtobool(value):
34+
if isinstance(value, bool):
35+
return value
3436
value = value.lower()
3537

3638
if value in TRUE_VALUES:

0 commit comments

Comments
 (0)