mypy fixed types
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
"""Definition of put function."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
@@ -16,8 +17,8 @@ def put(
|
||||
"""Put buffer in bucket in MinIO and return MD5 checksum as object name."""
|
||||
assert isinstance(client, Minio)
|
||||
assert isinstance(buffer, BytesIO)
|
||||
bucket_name = os.getenv('MINIO_BUCKET_NAME', default=None)
|
||||
assert isinstance(bucket_name, str)
|
||||
bucket_name = os.getenv('MINIO_BUCKET_NAME', default='')
|
||||
assert len(bucket_name) > 0
|
||||
# get md5 of image
|
||||
checksum = md5(buffer.getbuffer()).hexdigest()
|
||||
# prepare for saving
|
||||
|
||||
Reference in New Issue
Block a user