Skip to content

Commit

Permalink
Refactor debug mode check in get_is_debug.
Browse files Browse the repository at this point in the history
Update the get_is_debug function to accept additional truthy values for debugging, such as "yes", "y", and "1". This enhances flexibility in setting the debug mode environment variable.
  • Loading branch information
trentonyo committed Sep 23, 2024
1 parent 6761e25 commit 8a49b1f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions todo_or_not/utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ def get_todo_ignore_path(): # todoon


def get_is_debug():
_debug = os.environ.get("DEBUG", "False")
if _debug == "True":
_debug = os.environ.get("DEBUG", "False").lower()
if _debug == "true" or _debug == "yes" or _debug == "y" or _debug == "1":
return True
else:
return False
Expand Down

0 comments on commit 8a49b1f

Please sign in to comment.