From 50d2a457c8ea273c14a0053b00493473b86dbe21 Mon Sep 17 00:00:00 2001 From: xymy Date: Wed, 8 Nov 2023 02:02:06 +0800 Subject: [PATCH] Fix typing for FloatPrompt (#3151) Co-authored-by: Darren Burns --- CHANGELOG.md | 1 + rich/prompt.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3562f6df..52548cc4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Ensure font is correctly inherited in exported HTML https://github.com/Textualize/rich/issues/3104 +- Fixed typing for `FloatPrompt`. ## [13.6.0] - 2023-09-30 diff --git a/rich/prompt.py b/rich/prompt.py index 36e0bba6..972082b7 100644 --- a/rich/prompt.py +++ b/rich/prompt.py @@ -307,7 +307,7 @@ class IntPrompt(PromptBase[int]): validate_error_message = "[prompt.invalid]Please enter a valid integer number" -class FloatPrompt(PromptBase[int]): +class FloatPrompt(PromptBase[float]): """A prompt that returns a float. Example: