fix: please the flake8 god and fix to errors on the way

2 jobs for topic/default/gitlab-ci-generated-from-tox in 1 minute and 18 seconds (queued for 25 seconds)
Status Job ID Name Coverage
  Test
passed #63714
flake8

00:00:19

passed #63715
py27

00:01:18