-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #66 from Geet-George/skip-qc
add skip param to bypass QC checks
- Loading branch information
Showing
2 changed files
with
54 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
def get_bool(s): | ||
if isinstance(s, bool): | ||
return s | ||
elif isinstance(s, int): | ||
return bool(s) | ||
elif isinstance(s, str): | ||
lower_s = s.lower() | ||
if lower_s == "true": | ||
return True | ||
elif lower_s == "false": | ||
return False | ||
elif lower_s in ["0", "1"]: | ||
return bool(int(lower_s)) | ||
else: | ||
raise ValueError(f"Cannot convert {s} to boolean") | ||
else: | ||
raise ValueError(f"Cannot convert {s} to boolean") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters