chg: Orders of tests in make_bool

pull/382/head
Raphaël Vinot 2019-03-20 10:44:12 +01:00
parent 97b159e88c
commit f53690f406
1 changed files with 2 additions and 3 deletions

View File

@ -90,11 +90,10 @@ def _int_to_str(d):
def make_bool(value):
if isinstance(value, bool):
return value
if not value: # None, 0, '', {}, []
return False
if isinstance(value, int):
return bool(value)
if not value: # None, 0, '', {}, []
return False
if isinstance(value, str):
if value == '0':