[1.7.x] Fixed flake8 warnings.
[1.7.x] Fixed flake8 warnings.

Backport of 6f59d29158 from master

oscaro/django,jyotsna1820/django,oscaro/django,oscaro/django,oscaro/django,jyotsna1820/django,jyotsna1820/django,jyotsna1820/django