Skip to content

Commit 8fe13ca

Browse files
committed
ruff updates
1 parent 95cfdff commit 8fe13ca

File tree

1 file changed

+9
-28
lines changed

1 file changed

+9
-28
lines changed

adafruit_usb_host_mouse/__init__.py

Lines changed: 9 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def find_and_init_boot_mouse(cursor_image=DEFAULT_CURSOR): # noqa: PLR0912
122122
mouse_interface_index,
123123
mouse_endpoint_address,
124124
mouse_was_attached,
125-
mouse_tg
125+
tilegrid=mouse_tg,
126126
)
127127

128128
# if no mouse found
@@ -207,7 +207,7 @@ def find_and_init_report_mouse(cursor_image=DEFAULT_CURSOR): # noqa: PLR0912
207207
mouse_interface_index,
208208
mouse_endpoint_address,
209209
mouse_was_attached,
210-
mouse_tg
210+
tilegrid=mouse_tg,
211211
)
212212

213213
# if no mouse found
@@ -229,16 +229,9 @@ class BootMouse:
229229
Needed in order to properly clamp the mouse to the display bounds
230230
"""
231231

232-
def __init__(
233-
self,
234-
device,
235-
interface_index,
236-
endpoint_address,
237-
was_attached,
238-
tilegrid=None,
239-
scale=1
240-
): # noqa: PLR0913, too many args
241-
232+
def __init__( # noqa: PLR0913, too many args
233+
self, device, interface_index, endpoint_address, was_attached, *, tilegrid=None, scale=1
234+
):
242235
self.device = device
243236

244237
self.tilegrid = tilegrid
@@ -360,23 +353,11 @@ def update(self):
360353

361354

362355
class ReportMouse(BootMouse):
363-
def __init__(
364-
self,
365-
device,
366-
interface_index,
367-
endpoint_address,
368-
was_attached,
369-
tilegrid=None,
370-
scale=1
371-
): # noqa: PLR0913, too many args
372-
356+
def __init__( # noqa: PLR0913, too many args
357+
self, device, interface_index, endpoint_address, was_attached, *, tilegrid=None, scale=1
358+
):
373359
super().__init__(
374-
device,
375-
interface_index,
376-
endpoint_address,
377-
was_attached,
378-
tilegrid,
379-
scale
360+
device, interface_index, endpoint_address, was_attached, tilegrid=tilegrid, scale=scale
380361
)
381362

382363
def update(self):

0 commit comments

Comments
 (0)