Fix code to handle the latest flake8