Skip to content

Commit 53f004b

Browse files
authored
Merge branch 'main' into fix/posgresql-arrays
2 parents 445ad88 + 5c6d3be commit 53f004b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

awswrangler/_config.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,9 @@ def _apply_type(name: str, value: Any, dtype: type[_ConfigValueType], nullable:
224224
raise exceptions.InvalidArgumentValue(
225225
f"{name} configuration does not accept a null value. Please pass {dtype}."
226226
)
227+
# Handle case where string is empty, "False" or "0". Anything else is True
228+
if isinstance(value, str) and dtype is bool:
229+
return value.lower() not in ("false", "0", "")
227230
try:
228231
return dtype(value) if isinstance(value, dtype) is False else value
229232
except ValueError as ex:

0 commit comments

Comments
 (0)