Fix F403 flake8 errors and turn on flake8 CI