consistent typing

This commit is contained in:
2019-03-08 20:42:38 -08:00
parent 5609d5455f
commit b7ab13998e

4
pub.py
View File

@@ -40,7 +40,7 @@ def upload_file(filename, overwrite=True):
s3.upload_file(filename, BUCKET, filename, ExtraArgs={ s3.upload_file(filename, BUCKET, filename, ExtraArgs={
'ACL': 'public-read', 'ACL': 'public-read',
'ContentType': TYPE_MAP[ext], 'ContentType': TYPE_MAP[ext],
'CacheControl': 'public, max-age={}'.format('31536000' if ext in ['gif', 'jpg', 'png', 'webp'] else 86400) 'CacheControl': 'public, max-age={}'.format(31536000 if ext in ['gif', 'jpg', 'png', 'webp'] else 86400)
}) })
if (ext == 'html'): if (ext == 'html'):
@@ -48,7 +48,7 @@ def upload_file(filename, overwrite=True):
s3.upload_file(filename, BUCKET, filename[:-5], ExtraArgs={ s3.upload_file(filename, BUCKET, filename[:-5], ExtraArgs={
'ACL': 'public-read', 'ACL': 'public-read',
'ContentType': TYPE_MAP[ext], 'ContentType': TYPE_MAP[ext],
'CacheControl': 'public, max-age={}'.format('31536000' if ext in ['gif', 'jpg', 'png', 'webp'] else 86400) 'CacheControl': 'public, max-age={}'.format(31536000 if ext in ['gif', 'jpg', 'png', 'webp'] else 86400)
}) })
print('\tDone.') print('\tDone.')