Fixes for newer flake8 error messages

Signed-off-by: Mark Hymers <mark.hymers@ynic.york.ac.uk>
1 job for 1.0.2 in 2 minutes and 7 seconds (queued for 1 second)
latest
Status Job ID Name Coverage
  Build Test
passed #68621
build_test

00:02:07