-
Notifications
You must be signed in to change notification settings - Fork 426
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
Extract constants and exception into a module #2287
Conversation
Is this going to conflict with PR #2265 |
Yes, that can happen, but I think this should be merged before that. It is an important step towards cleaner and testable code in the logitech_receiver module. The constants and Exceptions are static things, that can exist in their own module. They can be used everywhere, as they only have a dependency on common. By extracting these into their own modules it reduces the code, that relies on the hidpp modules. That's the purpose of this refactoring. |
3abc901
to
ee9dc6c
Compare
Yes, this should be done, but after the imports fixes, as it touches the same place that the imports fixes do. You could download that PR and build on it. |
ee9dc6c
to
db87415
Compare
Yeah, it's fine. I can adapt it later. |
OK.. Once 1.1.11 is out we can work further on fixing the import structure and the hidpp stuff. |
@MattHag There are a few conflicts that need to be cleaned up. |
DEVICE_KIND from HID++ 2.0 is mapped to DEVICE_KIND from HID++ 1.0 in device.py and then the 1.0 version is used everywhere else. I wonder if therefore DEVICE_KIND should be put somewhere else (common?) so that it is not identified as an HIDPP 1.0-only enumeration, and the mapping itself moved into hidpp20.py. But perhaps the best way forward is to get this PR cleaned up and merged, and then do any fine-tuning. |
I tried to fix the conflicts here but had to download the PR, fix the conflicts, and then create PR #2317. |
Does not change any behavior, just reducing dependencies on low level modules in order to get the device module testable.
Related #1097