From ee26eb8608a12adfbb2a8c543b5dfd2182132bb9 Mon Sep 17 00:00:00 2001 From: Enric Pou Date: Wed, 28 May 2025 08:27:41 +0200 Subject: [PATCH] Add __float__ typing Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com> --- src/PIL/TiffImagePlugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PIL/TiffImagePlugin.py b/src/PIL/TiffImagePlugin.py index 272adee99..bbc9ffce8 100644 --- a/src/PIL/TiffImagePlugin.py +++ b/src/PIL/TiffImagePlugin.py @@ -407,7 +407,7 @@ class IFDRational(Rational): f = self._val.limit_denominator(max_denominator) return f.numerator, f.denominator - def __float__(self): + def __float__(self) -> float: return float(self._val) def __repr__(self) -> str: