Add __float__ typing

Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
This commit is contained in:
Enric Pou 2025-05-28 08:26:54 +02:00 committed by GitHub
parent 4fea45a02b
commit 7eec948fa4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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: