From 7eec948fa4f461780d20db1437105382512d6e74 Mon Sep 17 00:00:00 2001 From: Enric Pou Date: Wed, 28 May 2025 08:26:54 +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 9bdf7c015..0d6f3fba2 100644 --- a/src/PIL/TiffImagePlugin.py +++ b/src/PIL/TiffImagePlugin.py @@ -402,7 +402,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: