mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-06-06 14:13:15 +03:00
Add __float__ typing
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
This commit is contained in:
parent
e393f01a73
commit
ee26eb8608
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue
Block a user