Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(types): declare support for single questions #191

Merged
merged 1 commit into from
Dec 19, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions questionary/prompt.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from prompt_toolkit.output import ColorDepth
from typing import Any, Dict, Optional, Iterable, Mapping
from typing import Any, Dict, Optional, Iterable, Mapping, Union

from questionary import utils
from questionary.constants import DEFAULT_KBI_MESSAGE
Expand All @@ -13,7 +13,7 @@ def __init__(self, message: str, errors: Optional[BaseException] = None) -> None


def prompt(
questions: Iterable[Mapping[str, Any]],
questions: Union[Dict[str, Any], Iterable[Mapping[str, Any]]],
answers: Optional[Mapping[str, Any]] = None,
patch_stdout: bool = False,
true_color: bool = False,
Expand Down Expand Up @@ -74,7 +74,7 @@ def prompt(


def unsafe_prompt(
questions: Iterable[Mapping[str, Any]],
questions: Union[Dict[str, Any], Iterable[Mapping[str, Any]]],
answers: Optional[Mapping[str, Any]] = None,
patch_stdout: bool = False,
true_color: bool = False,
Expand Down