diff --git a/lib/logitech_receiver/base.py b/lib/logitech_receiver/base.py index de70a713..5701743e 100644 --- a/lib/logitech_receiver/base.py +++ b/lib/logitech_receiver/base.py @@ -199,7 +199,7 @@ def receivers(): yield from hidapi.enumerate(_filter_receivers) -def _filter_products_of_interest( +def filter_products_of_interest( bus_id: int, vendor_id: int, product_id: int, hidpp_short: bool = False, hidpp_long: bool = False ) -> dict[str, Any] | None: """Check that this product is of interest and if so return the device record for further checking""" @@ -219,7 +219,7 @@ def _filter_products_of_interest( def receivers_and_devices(): """Enumerate all the receivers and devices directly attached to the machine.""" - yield from hidapi.enumerate(_filter_products_of_interest) + yield from hidapi.enumerate(filter_products_of_interest) def notify_on_receivers_glib(glib: GLib, callback: Callable): @@ -230,7 +230,7 @@ def notify_on_receivers_glib(glib: GLib, callback: Callable): glib GLib instance. """ - return hidapi.monitor_glib(glib, callback, _filter_products_of_interest) + return hidapi.monitor_glib(glib, callback, filter_products_of_interest) def open_path(path) -> int: diff --git a/tests/logitech_receiver/test_base.py b/tests/logitech_receiver/test_base.py index daa5aedf..9b01a127 100644 --- a/tests/logitech_receiver/test_base.py +++ b/tests/logitech_receiver/test_base.py @@ -71,7 +71,7 @@ def test_filter_receivers_unknown(): ], ) def test_filter_products_of_interest(product_id, bus, hidpp_short, hidpp_long, expected): - receiver_info = base._filter_products_of_interest( + receiver_info = base.filter_products_of_interest( bus, LOGITECH_VENDOR_ID, product_id,