aboutsummaryrefslogtreecommitdiffstats
path: root/examples/statemachine/rogue/rogue.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/statemachine/rogue/rogue.py')
-rw-r--r--examples/statemachine/rogue/rogue.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/examples/statemachine/rogue/rogue.py b/examples/statemachine/rogue/rogue.py
index a43d4d1bc..f0ce9c28c 100644
--- a/examples/statemachine/rogue/rogue.py
+++ b/examples/statemachine/rogue/rogue.py
@@ -18,11 +18,11 @@ class MovementTransition(QEventTransition):
self.window = window
def eventTest(self, event):
- if (event.type() == QEvent.StateMachineWrapped and
- event.event().type() == QEvent.KeyPress):
+ if (event.type() == QEvent.StateMachineWrapped
+ and event.event().type() == QEvent.KeyPress):
key = event.event().key()
- return (key == Qt.Key_2 or key == Qt.Key_8 or
- key == Qt.Key_6 or key == Qt.Key_4)
+ return (key == Qt.Key_2 or key == Qt.Key_8
+ or key == Qt.Key_6 or key == Qt.Key_4)
return False
def onTransition(self, event):
@@ -74,8 +74,8 @@ class MainWindow(QMainWindow):
for x in range(self.width):
column = []
for y in range(self.height):
- if (x == 0 or x == self.width - 1 or y == 0 or
- y == self.height - 1 or generator.bounded(0, 40) == 0):
+ if (x == 0 or x == self.width - 1 or y == 0
+ or y == self.height - 1 or generator.bounded(0, 40) == 0):
column.append('#')
else:
column.append('.')
@@ -113,7 +113,7 @@ class MainWindow(QMainWindow):
input_state.addTransition(quit_transition)
machine.setInitialState(input_state)
- machine.finished.connect(qApp.quit)
+ machine.finished.connect(qApp.quit) # noqa: F821
machine.start()
def sizeHint(self):