Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions awswrangler/_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,9 @@ def _apply_type(name: str, value: Any, dtype: type[_ConfigValueType], nullable:
raise exceptions.InvalidArgumentValue(
f"{name} configuration does not accept a null value. Please pass {dtype}."
)
# Handle case where string is empty, "False" or "0". Anything else is True
if isinstance(value, str) and dtype is bool:
return value.lower() not in ("false", "0", "")
try:
return dtype(value) if isinstance(value, dtype) is False else value
except ValueError as ex:
Expand Down
Loading