Skip to content

Commit

Permalink
Implement function (and remove distutils dependency)
Browse files Browse the repository at this point in the history
  • Loading branch information
hakancelikdev committed Nov 17, 2023
1 parent 678ef49 commit f37ad76
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/unimport/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ def action_to_bool(action: str) -> bool:
are 'n', 'no', 'f', 'false', 'off', and '0'. Raises ValueError if
'val' is anything else.
"""
if (action := action.lower()) in ("y", "yes", "t", "true", "on", "1"):
action = action.lower()
if action in ("y", "yes", "t", "true", "on", "1"):
return True
elif action in ("n", "no", "f", "false", "off", "0"):
return False
Expand Down

0 comments on commit f37ad76

Please sign in to comment.