Skip to content

Commit 9794907

Browse files
committed
flake8 formatting fixes
1 parent fafe96d commit 9794907

File tree

6 files changed

+34
-23
lines changed

6 files changed

+34
-23
lines changed

arcade-platformer/arcade_platformer/01_game_skeleton.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,23 @@ def setup(self):
2727

2828
def on_key_press(self, key: int, modifiers: int):
2929
"""Processes key presses
30-
30+
3131
Arguments:
3232
key {int} -- Which key was pressed
3333
modifiers {int} -- Which modifiers were down at the time
3434
"""
3535

3636
def on_key_release(self, key: int, modifiers: int):
3737
"""Processes key releases
38-
38+
3939
Arguments:
4040
key {int} -- Which key was released
4141
modifiers {int} -- Which modifiers were down at the time
4242
"""
4343

4444
def on_update(self, delta_time: float):
4545
"""Updates the position of all screen objects
46-
46+
4747
Arguments:
4848
delta_time {float} -- How much time since the last call
4949
"""

arcade-platformer/arcade_platformer/02_open_game_window.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,23 +67,23 @@ def setup(self):
6767

6868
def on_key_press(self, key: int, modifiers: int):
6969
"""Processes key presses
70-
70+
7171
Arguments:
7272
key {int} -- Which key was pressed
7373
modifiers {int} -- Which modifiers were down at the time
7474
"""
7575

7676
def on_key_release(self, key: int, modifiers: int):
7777
"""Processes key releases
78-
78+
7979
Arguments:
8080
key {int} -- Which key was released
8181
modifiers {int} -- Which modifiers were down at the time
8282
"""
8383

8484
def on_update(self, delta_time: float):
8585
"""Updates the position of all screen objects
86-
86+
8787
Arguments:
8888
delta_time {float} -- How much time since the last call
8989
"""

arcade-platformer/arcade_platformer/03_read_level_one.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,23 +128,23 @@ def setup(self) -> None:
128128

129129
def on_key_press(self, key: int, modifiers: int):
130130
"""Processes key presses
131-
131+
132132
Arguments:
133133
key {int} -- Which key was pressed
134134
modifiers {int} -- Which modifiers were down at the time
135135
"""
136136

137137
def on_key_release(self, key: int, modifiers: int):
138138
"""Processes key releases
139-
139+
140140
Arguments:
141141
key {int} -- Which key was released
142142
modifiers {int} -- Which modifiers were down at the time
143143
"""
144144

145145
def on_update(self, delta_time: float):
146146
"""Updates the position of all screen objects
147-
147+
148148
Arguments:
149149
delta_time {float} -- How much time since the last call
150150
"""

arcade-platformer/arcade_platformer/04_define_player.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,23 +182,23 @@ def create_player_sprite(self) -> arcade.AnimatedWalkingSprite:
182182

183183
def on_key_press(self, key: int, modifiers: int):
184184
"""Processes key presses
185-
185+
186186
Arguments:
187187
key {int} -- Which key was pressed
188188
modifiers {int} -- Which modifiers were down at the time
189189
"""
190190

191191
def on_key_release(self, key: int, modifiers: int):
192192
"""Processes key releases
193-
193+
194194
Arguments:
195195
key {int} -- Which key was released
196196
modifiers {int} -- Which modifiers were down at the time
197197
"""
198198

199199
def on_update(self, delta_time: float):
200200
"""Updates the position of all screen objects
201-
201+
202202
Arguments:
203203
delta_time {float} -- How much time since the last call
204204
"""

arcade-platformer/arcade_platformer/05_update_and_draw.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,15 +182,15 @@ def create_player_sprite(self) -> arcade.AnimatedWalkingSprite:
182182

183183
def on_key_press(self, key: int, modifiers: int):
184184
"""Processes key presses
185-
185+
186186
Arguments:
187187
key {int} -- Which key was pressed
188188
modifiers {int} -- Which modifiers were down at the time
189189
"""
190190

191191
def on_key_release(self, key: int, modifiers: int):
192192
"""Processes key releases
193-
193+
194194
Arguments:
195195
key {int} -- Which key was released
196196
modifiers {int} -- Which modifiers were down at the time

arcade-platformer/arcade_platformer/11_title_view.py

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,9 @@ def on_key_press(self, key: int, modifiers: int) -> None:
121121
game_view = PlatformerView()
122122
game_view.setup()
123123
self.window.show_view(game_view)
124-
elif key == arcade.key.I:
125-
instructions_view = InstructionsView()
126-
self.window.show_view(instructions_view)
124+
# elif key == arcade.key.I:
125+
# instructions_view = InstructionsView()
126+
# self.window.show_view(instructions_view)
127127

128128

129129
# PlatformerView
@@ -158,8 +158,12 @@ def __init__(self) -> None:
158158
self.level = 1
159159

160160
# Load up our sounds here
161-
self.coin_sound = arcade.load_sound(str(ASSETS_PATH / "sounds" / "coin.wav"))
162-
self.jump_sound = arcade.load_sound(str(ASSETS_PATH / "sounds" / "jump.wav"))
161+
self.coin_sound = arcade.load_sound(
162+
str(ASSETS_PATH / "sounds" / "coin.wav")
163+
)
164+
self.jump_sound = arcade.load_sound(
165+
str(ASSETS_PATH / "sounds" / "jump.wav")
166+
)
163167
self.victory_sound = arcade.load_sound(
164168
str(ASSETS_PATH / "sounds" / "victory.wav")
165169
)
@@ -251,16 +255,21 @@ def create_player_sprite(self) -> arcade.AnimatedWalkingSprite:
251255
texture_path = ASSETS_PATH / "images" / "player"
252256

253257
# Setup the appropriate textures
254-
walking_paths = [texture_path / f"alienGreen_walk{x}.png" for x in (1, 2)]
255-
climbing_paths = [texture_path / f"alienGreen_climb{x}.png" for x in (1, 2)]
258+
walking_paths = [
259+
texture_path / f"alienGreen_walk{x}.png" for x in (1, 2)
260+
]
261+
climbing_paths = [
262+
texture_path / f"alienGreen_climb{x}.png" for x in (1, 2)
263+
]
256264
standing_path = texture_path / "alienGreen_stand.png"
257265

258266
# Load them all now
259267
walking_right_textures = [
260268
arcade.load_texture(texture) for texture in walking_paths
261269
]
262270
walking_left_textures = [
263-
arcade.load_texture(texture, mirrored=True) for texture in walking_paths
271+
arcade.load_texture(texture, mirrored=True)
272+
for texture in walking_paths
264273
]
265274

266275
walking_up_textures = [
@@ -272,7 +281,9 @@ def create_player_sprite(self) -> arcade.AnimatedWalkingSprite:
272281

273282
standing_right_textures = [arcade.load_texture(standing_path)]
274283

275-
standing_left_textures = [arcade.load_texture(standing_path, mirrored=True)]
284+
standing_left_textures = [
285+
arcade.load_texture(standing_path, mirrored=True)
286+
]
276287

277288
# Create the sprite
278289
player = arcade.AnimatedWalkingSprite()

0 commit comments

Comments
 (0)