summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYourun-Proger <shkrobov.yura@mail.ru>2021-09-11 19:47:27 +0300
committerDavid Lord <davidism@gmail.com>2021-09-26 07:10:02 -0700
commit2703f8f37393c0dc7ad4235310fa3a95762f6c9f (patch)
treeb3181142c43245ea412aec33f37df82db6cf979e
parent737cf793f5e5625c36e3627250beee34ee285f9d (diff)
downloadclick-2703f8f37393c0dc7ad4235310fa3a95762f6c9f.tar.gz
Fix type annotation for `type` arg
-rw-r--r--CHANGES.rst2
-rw-r--r--src/click/termui.py2
2 files changed, 3 insertions, 1 deletions
diff --git a/CHANGES.rst b/CHANGES.rst
index 38ec534..77783c7 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -16,6 +16,8 @@ Unreleased
to be relative to the containing directory. :issue:`1921`
- Completion does not skip Python's resource cleanup when exiting,
avoiding some unexpected warning output. :issue:`1738, 2017`
+- Fix type annotation for ``type`` argument in ``prompt`` function.
+ :issue:`2062`
Version 8.0.1
diff --git a/src/click/termui.py b/src/click/termui.py
index 034fe6e..4c5c3c1 100644
--- a/src/click/termui.py
+++ b/src/click/termui.py
@@ -84,7 +84,7 @@ def prompt(
default: t.Optional[t.Any] = None,
hide_input: bool = False,
confirmation_prompt: t.Union[bool, str] = False,
- type: t.Optional[ParamType] = None,
+ type: t.Optional[t.Union[ParamType, t.Any]] = None,
value_proc: t.Optional[t.Callable[[str], t.Any]] = None,
prompt_suffix: str = ": ",
show_default: bool = True,