fix code due to flake8 upgrade