Skip to content

Commit

Permalink
style: remove debug print statements from get_answer_yes_or_no
Browse files Browse the repository at this point in the history
  • Loading branch information
zackees committed Nov 5, 2024
1 parent 7065ed7 commit 473bae4
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/zcmds/cmds/common/codeup.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,11 @@ def get_answer_yes_or_no(question: str, default: Optional[str] = None) -> bool:
"""Ask a yes/no question and return the answer."""
while True:
answer = input(question + " [y/n]: ").lower().strip()
print(f"answer was {answer}")
if "y" in answer:
print("returning True")
return True
if "n" in answer:
print("returning False")
return False
if answer == "" and default is not None:
print(f"returning default {default}")
return default == "y"
print("Please answer 'yes' or 'no'.")

Expand Down

0 comments on commit 473bae4

Please sign in to comment.