fix flake8 errors

5 jobs for deprecation in 14 minutes and 52 seconds (queued for 1 second)