Skip to content

Commit

Permalink
Remove redundant assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
realshouzy committed Feb 13, 2024
1 parent a9939a8 commit f870667
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pip_review.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,11 @@ def ask(self, prompt: str) -> str:
question_last: str = (
f"{prompt} [Y]es, [N]o, [A]ll, [Q]uit ({self.last_answer}) "
)
answer = input(question_last if self.last_answer else question_default)
answer = answer.strip().casefold()
answer = (
input(question_last if self.last_answer else question_default)
.strip()
.casefold()
)
answer = self.last_answer if answer == "" else answer

if answer in {"q", "a"}:
Expand Down

0 comments on commit f870667

Please sign in to comment.