Fix lint issues

Upgrading pyflakes meant the number of violations jumped above the
failure threshold.

Also added a few more warnings to the ignore list.