@@ -99,7 +99,10 @@ class CursorPoller(object):
9999
100100 def __init__ (self , splash , cursor_bmp ):
101101 logging .getLogger ('Paint' ).debug ('Creating a CursorPoller' )
102- self ._mouse_cursor = Cursor (board .DISPLAY , display_group = splash , bmp = cursor_bmp , cursor_speed = 2 )
102+ self ._mouse_cursor = Cursor (board .DISPLAY ,
103+ display_group = splash ,
104+ bmp = cursor_bmp ,
105+ cursor_speed = 2 )
103106 self ._x_offset = cursor_bmp .width // 2
104107 self ._y_offset = cursor_bmp .height // 2
105108 self ._cursor = DebouncedCursorManager (self ._mouse_cursor )
@@ -111,13 +114,16 @@ def poll(self):
111114 self ._cursor .update ()
112115 button = self ._cursor .held
113116 if button :
114- location = (self ._mouse_cursor .x + self ._x_offset , self ._mouse_cursor .y + self ._y_offset )
117+ location = (self ._mouse_cursor .x + self ._x_offset ,
118+ self ._mouse_cursor .y + self ._y_offset )
115119 return button , location
116120
121+ #pylint:disable=unused-argument
117122 def poke (self , x = None , y = None ):
118123 """Force a bitmap refresh."""
119124 self ._mouse_cursor .hide ()
120125 self ._mouse_cursor .show ()
126+ #pylint:enable=unused-argument
121127
122128################################################################################
123129
@@ -147,8 +153,8 @@ def __init__(self, display=board.DISPLAY):
147153 for i , c in enumerate (Color .colors ):
148154 self ._palette_palette [i ] = c
149155 self ._palette_sprite = displayio .TileGrid (self ._palette_bitmap ,
150- pixel_shader = self ._palette_palette ,
151- x = 0 , y = 0 )
156+ pixel_shader = self ._palette_palette ,
157+ x = 0 , y = 0 )
152158 self ._splash .append (self ._palette_sprite )
153159
154160 self ._fg_bitmap = displayio .Bitmap (self ._w , self ._h , 5 )
@@ -195,8 +201,8 @@ def _make_color_palette(self):
195201
196202
197203 return displayio .TileGrid (self ._palette_bitmap ,
198- pixel_shader = self ._palette_palette ,
199- x = 0 , y = 0 )
204+ pixel_shader = self ._palette_palette ,
205+ x = 0 , y = 0 )
200206
201207 def _cursor_bitmap (self ):
202208 bmp = displayio .Bitmap (9 , 9 , 3 )
@@ -292,8 +298,10 @@ def _handle_press(self, location):
292298 self ._plot (location [0 ], location [1 ], self ._pencolor )
293299 self ._poller .poke ()
294300
301+ #pylint:disable=unused-argument
295302 def _handle_release (self , location ):
296303 self ._logger .debug ('Released!' )
304+ #pylint:enable=unused-argument
297305
298306 @property
299307 def _was_just_pressed (self ):
@@ -309,6 +317,8 @@ def _did_move(self):
309317 x_changed = self ._location [0 ] != self ._last_location [0 ]
310318 y_changed = self ._location [1 ] != self ._last_location [1 ]
311319 return x_changed or y_changed
320+ else :
321+ return False
312322
313323 def _update (self ):
314324 self ._last_pressed , self ._last_location = self ._pressed , self ._location
0 commit comments