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