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:27:41 +02:00 committed by GitHub
parent e393f01a73
commit ee26eb8608
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

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