Add more stringent flake8 checks
Add more stringent flake8 checks

This covers things such as
 * assigned but unused variables,
 * redefinition of unused variable
 * undefined names
 * bare 'except's
   (these also catch KeyboardInterrupt, which may not be intentional)
 * comparison to True/False with ==/!= instead of is/is not

DiamondLightSource/ispyb-api,DiamondLightSource/ispyb-api