diff --git a/lib/hidapi/__init__.py b/lib/hidapi/__init__.py index e1add9e23c..06fd2d641e 100644 --- a/lib/hidapi/__init__.py +++ b/lib/hidapi/__init__.py @@ -18,30 +18,30 @@ import platform if platform.system() in ("Darwin", "Windows"): - from hidapi.hidapi import close # noqa: F401 - from hidapi.hidapi import enumerate # noqa: F401 - from hidapi.hidapi import find_paired_node # noqa: F401 - from hidapi.hidapi import find_paired_node_wpid # noqa: F401 - from hidapi.hidapi import get_manufacturer # noqa: F401 - from hidapi.hidapi import get_product # noqa: F401 - from hidapi.hidapi import get_serial # noqa: F401 - from hidapi.hidapi import monitor_glib # noqa: F401 - from hidapi.hidapi import open # noqa: F401 - from hidapi.hidapi import open_path # noqa: F401 - from hidapi.hidapi import read # noqa: F401 - from hidapi.hidapi import write # noqa: F401 + from hidapi.hidapi_impl import close # noqa: F401 + from hidapi.hidapi_impl import enumerate # noqa: F401 + from hidapi.hidapi_impl import find_paired_node # noqa: F401 + from hidapi.hidapi_impl import find_paired_node_wpid # noqa: F401 + from hidapi.hidapi_impl import get_manufacturer # noqa: F401 + from hidapi.hidapi_impl import get_product # noqa: F401 + from hidapi.hidapi_impl import get_serial # noqa: F401 + from hidapi.hidapi_impl import monitor_glib # noqa: F401 + from hidapi.hidapi_impl import open # noqa: F401 + from hidapi.hidapi_impl import open_path # noqa: F401 + from hidapi.hidapi_impl import read # noqa: F401 + from hidapi.hidapi_impl import write # noqa: F401 else: - from hidapi.udev import close # noqa: F401 - from hidapi.udev import enumerate # noqa: F401 - from hidapi.udev import find_paired_node # noqa: F401 - from hidapi.udev import find_paired_node_wpid # noqa: F401 - from hidapi.udev import get_manufacturer # noqa: F401 - from hidapi.udev import get_product # noqa: F401 - from hidapi.udev import get_serial # noqa: F401 - from hidapi.udev import monitor_glib # noqa: F401 - from hidapi.udev import open # noqa: F401 - from hidapi.udev import open_path # noqa: F401 - from hidapi.udev import read # noqa: F401 - from hidapi.udev import write # noqa: F401 + from hidapi.udev_impl import close # noqa: F401 + from hidapi.udev_impl import enumerate # noqa: F401 + from hidapi.udev_impl import find_paired_node # noqa: F401 + from hidapi.udev_impl import find_paired_node_wpid # noqa: F401 + from hidapi.udev_impl import get_manufacturer # noqa: F401 + from hidapi.udev_impl import get_product # noqa: F401 + from hidapi.udev_impl import get_serial # noqa: F401 + from hidapi.udev_impl import monitor_glib # noqa: F401 + from hidapi.udev_impl import open # noqa: F401 + from hidapi.udev_impl import open_path # noqa: F401 + from hidapi.udev_impl import read # noqa: F401 + from hidapi.udev_impl import write # noqa: F401 __version__ = "0.9" diff --git a/lib/hidapi/hidapi.py b/lib/hidapi/hidapi_impl.py similarity index 100% rename from lib/hidapi/hidapi.py rename to lib/hidapi/hidapi_impl.py diff --git a/lib/hidapi/udev.py b/lib/hidapi/udev_impl.py similarity index 100% rename from lib/hidapi/udev.py rename to lib/hidapi/udev_impl.py diff --git a/lib/logitech_receiver/__init__.py b/lib/logitech_receiver/__init__.py index 8667a0e490..9ae782db7f 100644 --- a/lib/logitech_receiver/__init__.py +++ b/lib/logitech_receiver/__init__.py @@ -15,7 +15,7 @@ ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. """Low-level interface for devices using Logitech HID++ protocol. -Uses the HID api exposed through hidapi.py, a Python thin layer over a native +Uses the HID api exposed through hidapi_impl.py, a Python thin layer over a native implementation. """ diff --git a/tests/hidapi/__init__.py b/tests/hidapi/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/hidapi/test_hidapi.py b/tests/hidapi/test_hidapi.py new file mode 100644 index 0000000000..2695e425c3 --- /dev/null +++ b/tests/hidapi/test_hidapi.py @@ -0,0 +1,7 @@ +from unittest import mock + +import hidapi + + +def test_find_paired_node(): + hidapi.enumerate(mock.Mock())