-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Device major version variant #116
Device major version variant #116
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 7 out of 15 changed files in this pull request and generated no suggestions.
Files not reviewed (8)
- src/blinkstick/init.py: Evaluated as low risk
- src/blinkstick/backends/base.py: Evaluated as low risk
- src/blinkstick/backends/unix_like.py: Evaluated as low risk
- src/blinkstick/clients/blinkstick.py: Evaluated as low risk
- src/blinkstick/constants.py: Evaluated as low risk
- tests/devices/test_blinkstick_device.py: Evaluated as low risk
- src/blinkstick/enums.py: Evaluated as low risk
- src/blinkstick/models.py: Evaluated as low risk
Rename BlinkStickVariant.identify() to .from_version_attrs(), for added clarity.
Add a serial number model so that it's easier to decompose th estring into constituent parts
fc3f52c
to
7e5837e
Compare
7e5837e
to
1aa1b0f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 7 out of 16 changed files in this pull request and generated no suggestions.
Files not reviewed (9)
- src/blinkstick/enums.py: Evaluated as low risk
- tests/devices/test_blinkstick_device.py: Evaluated as low risk
- tests/clients/test_blinkstick.py: Evaluated as low risk
- src/blinkstick/models.py: Evaluated as low risk
- src/blinkstick/init.py: Evaluated as low risk
- src/blinkstick/backends/win32.py: Evaluated as low risk
- src/blinkstick/backends/unix_like.py: Evaluated as low risk
- src/blinkstick/clients/blinkstick.py: Evaluated as low risk
- src/scripts/main.py: Evaluated as low risk
This pull request includes significant changes to the BlinkStick library, focusing on refactoring the handling of BlinkStick variants and improving the device initialization process. The most important changes include moving
BlinkStickVariant
to a newenums
module, updating theBlinkStickDevice
class to useSerialDetails
, and adding new methods and tests to support these updates.Refactoring and code organization:
src/blinkstick/__init__.py
,src/blinkstick/clients/blinkstick.py
,src/scripts/main.py
,tests/clients/test_blinkstick.py
: Updated imports to reflect the new location ofBlinkStickVariant
in theenums
module. [1] [2] [3] [4]Device initialization and variant handling:
src/blinkstick/backends/base.py
,src/blinkstick/backends/unix_like.py
,src/blinkstick/backends/win32.py
: Refactored backend classes to useSerialDetails
for serial number handling and updated methods to reflect this change. [1] [2] [3]src/blinkstick/devices/device.py
: UpdatedBlinkStickDevice
class to includemajor_version
andvariant
fields, and added a__post_init__
method to set the variant usingSerialDetails
.New methods and tests:
src/blinkstick/backends/base.py
,src/blinkstick/clients/blinkstick.py
: Addedget_variant
method to backends and updated theget_variant
method inBlinkStick
class to use the backend method. [1] [2]tests/devices/test_blinkstick_device.py
,tests/models/serial_number.py
: Added tests for the newSerialDetails
class and updated tests forBlinkStickDevice
to verify correct initialization and variant handling. [1] [2]