Skip to content

Commit

Permalink
Make minor adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
realshouzy committed Jan 27, 2024
1 parent dcbe8e4 commit 0e2f69e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pip_review.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def _setup_logging(*, verbose: bool) -> logging.Logger:

format_: str = "%(message)s"

logger: logging.Logger = logging.getLogger("pip-review")
logger: logging.Logger = logging.getLogger(__title__)

stdout_handler: logging.StreamHandler[TextIO] = logging.StreamHandler(sys.stdout)
stdout_handler.addFilter(StdOutFilter())
Expand All @@ -229,12 +229,12 @@ def ask(self, prompt: str) -> str:
if self.cached_answer is not None:
return self.cached_answer

question_default: str = f"{prompt} [Y]es, [N]o, [A]ll, [Q]uit "
answer: str | None = ""
while answer not in {"y", "n", "a", "q"}:
question_last: str = (
f"{prompt} [Y]es, [N]o, [A]ll, [Q]uit ({self.last_answer}) "
)
question_default: str = f"{prompt} [Y]es, [N]o, [A]ll, [Q]uit "
answer = input(question_last if self.last_answer else question_default)
answer = answer.strip().casefold()
answer = self.last_answer if answer == "" else answer
Expand Down

0 comments on commit 0e2f69e

Please sign in to comment.