use the already import io

instead of importing again from io (lgtm suggestion)
This commit is contained in:
Frédéric Chapoton 2019-03-02 21:19:57 +01:00 committed by GitHub
parent b84ab5223d
commit e514fbbbb1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -679,8 +679,7 @@ class Image(object):
:returns: png version of the image as bytes
"""
from io import BytesIO
b = BytesIO()
b = io.BytesIO()
self.save(b, 'PNG')
return b.getvalue()