Skip to content

Commit

Permalink
Merge pull request #191 from Yajo/fix-single-prompt-types
Browse files Browse the repository at this point in the history
fix(types): declare support for single questions
  • Loading branch information
tmbo committed Dec 19, 2021
2 parents d13e7e5 + d0b4fa6 commit 1000f1e
Showing 1 changed file with 3 additions and 3 deletions.
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

0 comments on commit 1000f1e

Please sign in to comment.