Fix failing pyflakes tests