Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion cms/djangoapps/contentstore/management/commands/prompt.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
Takes user input.
"""

from typing import Literal

import sys


def query_yes_no(question, default="yes"):
def query_yes_no(question: str, default: Literal["yes", "no"] | None ="yes") -> bool:
"""Ask a yes/no question via raw_input() and return their answer.

"question" is a string that is presented to the user.
Expand Down
Loading
Loading