Skip to content

Commit

Permalink
Refactor: Distinguish module from package
Browse files Browse the repository at this point in the history
Adapt module names to easily distinguish them.

Related pwr-Solaar#2480
  • Loading branch information
MattHag committed Sep 15, 2024
1 parent fdd2c79 commit da797ac
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 25 deletions.
48 changes: 24 additions & 24 deletions lib/hidapi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion lib/logitech_receiver/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"""

Expand Down
Empty file added tests/hidapi/__init__.py
Empty file.
7 changes: 7 additions & 0 deletions tests/hidapi/test_hidapi.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from unittest import mock

import hidapi


def test_find_paired_node():
hidapi.find_paired_node(mock.Mock(), 0, 0)

0 comments on commit da797ac

Please sign in to comment.