Fixed pyflakes for tasks.py