Fix flake8 errors

5 jobs for deprecation in 36 minutes and 32 seconds (queued for 3 seconds)