Skip to content

Commit

Permalink
Merge pull request #2340 from uccser/2339-bug-ci-failing-style-check
Browse files Browse the repository at this point in the history
fix: style test failing, do not compare types, for exact checks use is
  • Loading branch information
jimbonothing64 authored Dec 20, 2023
2 parents 288a5de + c9ba78c commit c092c4d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions csunplugged/tests/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ def bool_to_yes_no(value, error_on_invalid=False):
Raises:
ValueError if value isn't "yes" or "no".
"""
if type(value) == bool and value:
if type(value) is bool and value:
return "yes"
elif type(value) == bool:
elif type(value) is bool:
return "no"
elif error_on_invalid:
raise ValueError("Expected True or False.")
Expand Down
4 changes: 2 additions & 2 deletions csunplugged/utils/bool_to_yes_no.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ def bool_to_yes_no(value, error_on_invalid=False):
Raises:
ValueError if value isn't "yes" or "no".
"""
if type(value) == bool and value:
if type(value) is bool and value:
return "yes"
elif type(value) == bool:
elif type(value) is bool:
return "no"
elif error_on_invalid:
raise ValueError("Expected True or False.")
Expand Down

0 comments on commit c092c4d

Please sign in to comment.