Skip to content

Commit 3cd534b

Browse files
committed
Fix conversion of bool values from string to bool
1 parent e2a262c commit 3cd534b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

sonar/utilities.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,10 @@ def convert_to_type(value: str) -> Any:
172172
return float(value)
173173
except ValueError:
174174
pass
175-
try:
176-
return bool(value)
177-
except ValueError:
178-
pass
175+
if value.lower() == "true":
176+
return True
177+
if value.lower() == "false":
178+
return False
179179
return value
180180

181181

0 commit comments

Comments
 (0)