@@ -32,16 +32,20 @@ class DefaultIndicatorWidget(UnityEmulatorBase):
3232 # TODO: submit to autopilot.introspection.types.Rectangle
3333 def get_center(self):
3434 """Returns (x, y) representing the center of a globalRect."""
35− return (self.globalRect[0]+int(self.globalRect[2]/2),
36− self.globalRect[1]+int(self.globalRect[3]/2))
35+ return (
36+ self.globalRect[0]+int(self.globalRect[2]/2),
37+ self.globalRect[1]+int(self.globalRect[3]/2)
38+ )
3739
3840 def swipe_to_open_indicator(self, window):
3941 """Swipe to open the indicator, wait until it's open."""
4042 start_x, start_y = self.get_center()
4143 end_x = start_x
4244 end_y = window.height
43− self.pointer.drag(start_x, start_y,
44− end_x, end_y)
45+ self.pointer.drag(
46+ start_x, start_y,
47+ end_x, end_y
48+ )
4549 # TODO: assert that the indicator page opened
4650
4751 def swipe_to_close_indicator(self, window):
@@ -49,6 +53,8 @@ class DefaultIndicatorWidget(UnityEmulatorBase):
4953 end_x, end_y = self.get_center()
5054 start_x = end_x
5155 start_y = window.height
52− self.pointer.drag(start_x, start_y,
53− end_x, end_y)
56+ self.pointer.drag(
57+ start_x, start_y,
58+ end_x, end_y
59+ )
5460 # TODO: assert that the indicator page closed