Fix flake8 and other problems

2 jobs from instance_auth in 1 minute 20 seconds (queued for 3 seconds)
Status Job ID Name Coverage
  Test
passed #1157
flake8

00:19

passed #1158
test

01:01