pulse2: Fix pyflakes warnings