From e5e352ddf3eba667d40a015f646eaaae95015077 Mon Sep 17 00:00:00 2001 From: Simon Cross Date: Sat, 5 Mar 2016 21:07:38 +0200 Subject: [PATCH] PEP8 fixes. --- koperkapel/scenes/level.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/koperkapel/scenes/level.py b/koperkapel/scenes/level.py index e26d11d..0cde651 100644 --- a/koperkapel/scenes/level.py +++ b/koperkapel/scenes/level.py @@ -4,7 +4,8 @@ from pgzero.constants import keys from pygame import Surface import pygame.locals as pgl from ..loaders.levelloader import levels -from .base import Scene, ChangeSceneEvent, MoveViewportEvent, WorldEvent, defer_to_update +from .base import ( + Scene, ChangeSceneEvent, MoveViewportEvent, WorldEvent, defer_to_update) from ..constants import TILE_SIZE, WIDTH, HEIGHT from ..roaches import build_roach from ..vehicles.base import Vehicle @@ -115,8 +116,9 @@ class GameLevelScene(BaseLevelScene): def exit(self, world): for generator in self._generators: - # We don't want these running while we're on other levels, but we don't want to delete them - # here either (because of the vehicle management view) + # We don't want these running while we're on other levels, but we + # don't want to delete them here either (because of the vehicle + # management view) generator.pause() def _init_generators(self): @@ -204,7 +206,8 @@ class GameLevelScene(BaseLevelScene): (keys.RIGHT, (1, 0), -90), ): if key == k: - if self._angle == angle and self._last_key_down > self._key_rate: + if (self._angle == angle and + self._last_key_down > self._key_rate): nx, ny = x + dp[0], y + dp[1] if self._can_move(nx, ny): self._set_pos(nx, ny) @@ -259,7 +262,8 @@ class GameLevelScene(BaseLevelScene): if key in (keys.DOWN, keys.UP, keys.LEFT, keys.RIGHT): self._held_keys.clear() self._held_keys.add(key) - # We do this so pressing the key has an instant effect, and can then be held + # We do this so pressing the key has an instant effect, and can + # then be held self._last_key_down = self._key_rate + 0.01 return self._movement_key(key, 0.01) elif key == keys.C: -- 2.34.1