mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-07-11 00:32:27 +03:00
Mypy fix: Cast v.numerator to float
This commit is contained in:
parent
3ac0420d6c
commit
c1f0c23b47
|
@ -691,7 +691,7 @@ class ImageFileDirectory_v2(_IFDv2Base):
|
||||||
if all(isinstance(v, IFDRational) for v in values):
|
if all(isinstance(v, IFDRational) for v in values):
|
||||||
for v in values:
|
for v in values:
|
||||||
assert isinstance(v, IFDRational)
|
assert isinstance(v, IFDRational)
|
||||||
if v < 0 or (math.isnan(v) and v.numerator < 0):
|
if v < 0 or (math.isnan(v) and float(v.numerator) < 0):
|
||||||
self.tagtype[tag] = TiffTags.SIGNED_RATIONAL
|
self.tagtype[tag] = TiffTags.SIGNED_RATIONAL
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user