From 3d5965fe25ce2c732e55c10bcad269ce3ef7eb0a Mon Sep 17 00:00:00 2001 From: Rob Berwick Date: Sat, 30 Nov 2024 20:23:07 +0000 Subject: [PATCH 1/2] refactor: devices should be a proper package --- src/blinkstick/backends/base.py | 2 +- src/blinkstick/backends/unix_like.py | 2 +- src/blinkstick/backends/win32.py | 2 +- src/blinkstick/clients/blinkstick.py | 2 +- src/blinkstick/devices/__init__.py | 3 +++ 5 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 src/blinkstick/devices/__init__.py diff --git a/src/blinkstick/backends/base.py b/src/blinkstick/backends/base.py index 452fe54..c907a7b 100644 --- a/src/blinkstick/backends/base.py +++ b/src/blinkstick/backends/base.py @@ -4,7 +4,7 @@ from typing import TypeVar, Generic -from blinkstick.devices.device import BlinkStickDevice +from blinkstick.devices import BlinkStickDevice T = TypeVar("T") diff --git a/src/blinkstick/backends/unix_like.py b/src/blinkstick/backends/unix_like.py index fb85cdb..d30f443 100644 --- a/src/blinkstick/backends/unix_like.py +++ b/src/blinkstick/backends/unix_like.py @@ -5,7 +5,7 @@ from blinkstick.constants import VENDOR_ID, PRODUCT_ID from blinkstick.backends.base import BaseBackend -from blinkstick.devices.device import BlinkStickDevice +from blinkstick.devices import BlinkStickDevice from blinkstick.exceptions import BlinkStickException diff --git a/src/blinkstick/backends/win32.py b/src/blinkstick/backends/win32.py index 7f4754c..9399951 100644 --- a/src/blinkstick/backends/win32.py +++ b/src/blinkstick/backends/win32.py @@ -7,7 +7,7 @@ from blinkstick.constants import VENDOR_ID, PRODUCT_ID from blinkstick.backends.base import BaseBackend -from blinkstick.devices.device import BlinkStickDevice +from blinkstick.devices import BlinkStickDevice from blinkstick.exceptions import BlinkStickException diff --git a/src/blinkstick/clients/blinkstick.py b/src/blinkstick/clients/blinkstick.py index 17dddc7..8c0fd7d 100644 --- a/src/blinkstick/clients/blinkstick.py +++ b/src/blinkstick/clients/blinkstick.py @@ -13,7 +13,7 @@ ColorFormat, ) from blinkstick.constants import BlinkStickVariant -from blinkstick.devices.device import BlinkStickDevice +from blinkstick.devices import BlinkStickDevice from blinkstick.exceptions import BlinkStickException from blinkstick.utilities import string_to_info_block_data diff --git a/src/blinkstick/devices/__init__.py b/src/blinkstick/devices/__init__.py new file mode 100644 index 0000000..da0f84c --- /dev/null +++ b/src/blinkstick/devices/__init__.py @@ -0,0 +1,3 @@ +from .device import BlinkStickDevice + +__all__ = ["BlinkStickDevice"] From b4cf8147ca737d724944f30aacbcdeaa258530aa Mon Sep 17 00:00:00 2001 From: Rob Berwick Date: Sat, 30 Nov 2024 20:23:31 +0000 Subject: [PATCH 2/2] chore: remove unused import --- src/blinkstick/clients/blinkstick.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/blinkstick/clients/blinkstick.py b/src/blinkstick/clients/blinkstick.py index 8c0fd7d..3efd004 100644 --- a/src/blinkstick/clients/blinkstick.py +++ b/src/blinkstick/clients/blinkstick.py @@ -14,7 +14,6 @@ ) from blinkstick.constants import BlinkStickVariant from blinkstick.devices import BlinkStickDevice -from blinkstick.exceptions import BlinkStickException from blinkstick.utilities import string_to_info_block_data if sys.platform == "win32":