doit: replace all dict literals with dict()

This commit is contained in:
codl 2017-08-11 21:18:40 +02:00
parent 54545a3a3d
commit 5147b7e3ff
No known key found for this signature in database
GPG Key ID: 6CD7C8891ED1233A
1 changed files with 18 additions and 18 deletions

36
dodo.py
View File

@ -14,22 +14,22 @@ def task_gen_logo():
new.save('static/logotype-{}.png'.format(width), optimize=True)
im.save('static/logotype.png', optimize=True)
return {
'actions': [gen_logo],
'targets': [f'static/logotype-{width}.png' for width in widths]\
return dict(
actions=[gen_logo],
targets=[f'static/logotype-{width}.png' for width in widths]
+ ['static/logotype.png'],
'file_dep': ['assets/logotype.png'],
'clean': True,
}
file_dep=['assets/logotype.png'],
clean=True,
)
def task_copy_icon():
import shutil
return {
'actions': [lambda: shutil.copy('assets/icon.png', 'static/icon.png')],
'targets': ['static/icon.png'],
'file_dep': ['assets/icon.png'],
'clean': True,
}
return dict(
actions=[lambda: shutil.copy('assets/icon.png', 'static/icon.png')],
targets=['static/icon.png'],
file_dep=['assets/icon.png'],
clean=True,
)
def task_minify_css():
"""minify css"""
@ -41,12 +41,12 @@ def task_minify_css():
with open('static/styles.css', 'w') as out:
out.write(compress(in_.read()))
return {
'actions': [minify],
'targets': ['static/styles.css'],
'file_dep': ['assets/styles.css'],
'clean': True,
}
return dict(
actions=[minify],
targets=['static/styles.css'],
file_dep=['assets/styles.css'],
clean=True,
)
def task_compress_static():
import brotli