mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-26 07:04:45 +03:00
Typing: Ignore py2/py3 differences
This commit is contained in:
parent
02e10805e0
commit
3ee774ede0
|
@ -1324,7 +1324,7 @@ class Image(object):
|
|||
if bytes is str:
|
||||
return [i8(c) for c in self.im.getpalette()]
|
||||
else:
|
||||
return list(self.im.getpalette())
|
||||
return list(self.im.getpalette()) # type: ignore
|
||||
except ValueError:
|
||||
return None # no palette
|
||||
|
||||
|
@ -1688,7 +1688,7 @@ class Image(object):
|
|||
else:
|
||||
if not isinstance(data, bytes):
|
||||
if bytes is str:
|
||||
data = "".join(chr(x) for x in data)
|
||||
data = "".join(chr(x) for x in data) # type: ignore
|
||||
else:
|
||||
data = bytes(data)
|
||||
palette = ImagePalette.raw(rawmode, data)
|
||||
|
|
Loading…
Reference in New Issue
Block a user