Fixes for newer flake8 error messages

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

00:02:13