Commit Graph

131 Commits

Author SHA1 Message Date
MattHag 46366b2430 Fix warnings from automatic code inspections
Warnings found by automatic code inspection and partially tackled
- Drop distuitls inf favour of setuptools
- Replace deprecated pyudev.Device.from_device_number
- Remove unnecessary brackets
- Avoid access to private variables etc.
- Shadows built-in name
- Line length >120 characters
- Not a module level variable
- Simplify clause
and more
2024-10-11 07:42:38 -04:00
MattHag be83dac209
hid: Convert definition of HID registers to enum
* Refactor HID Register definitions

Use enums for distinct type hints, easy discovery of registers.
Make constants uppercase and benefit from enum auto-completion.

Related #2273

* Improve type hints: Registers
2024-06-02 10:34:00 -04:00
MattHag c23ebcd267 Use double quotes for module level docstrings
Make module level docstrings distinguishable from license text.

Related #2273
2024-06-02 09:54:21 -04:00
MattHag 815dce07be Unify imports in logitech package
Related #2273
2024-05-23 16:42:18 -04:00
Matthias Hagmann e92f1a8a0b Automatically upgrade strings to f-string
Used flynt to convert strings to f-strings, where safely possible.

Usage:
flynt .

Related #2372
2024-03-13 11:02:50 -04:00
Matthias Hagmann 7ef3059b69 clean up: Remove editor specific marks
Related #2273
2024-02-29 10:10:46 -05:00
Peter F. Patel-Schneider af7806ed00 device: fix typo 2024-02-21 16:04:32 -05:00
Matthias Hagmann 04e709b00a Remove yapf exclusions
Related #2295
2024-02-20 15:41:10 -05:00
Matthias Hagmann 7774569971 Apply ruff format
Run ruff auto formatting using:
ruff format .

Related #2295
2024-02-20 15:41:10 -05:00
Matthias Hagmann 2fcab65486 logitech_receiver: Move hidpp10 constants into new module
Related #1097
2024-02-20 05:58:33 -05:00
Peter F. Patel-Schneider 31d795fcb8 device: improve imports in logitech_receiver
device: move some imports to top of modules

device: break up imports loop with device descriptors

device: break up imports loop by moving a function from notifications.py to setting_templates.py

device: break import loop between device.py and diversion.py by using device to access method
2024-02-18 06:21:35 -05:00
Peter F. Patel-Schneider 097736478d devices: override name of Candy Companion Chip 2024-02-04 14:20:12 -05:00
Peter F. Patel-Schneider 9350300fd8 device: remove incorrect feature for M325 mice 2023-12-14 08:50:02 -05:00
Clement Cheung 4b2bb921b1 device: add K845 keyboard 2023-12-05 15:15:51 -05:00
Peter F. Patel-Schneider 7706882a27 device: add support for MK550 2023-11-03 19:20:59 -04:00
Peter F. Patel-Schneider 485596cbf3 tools: permit BT devices for hidconsole with hidpp 2023-09-17 10:39:48 -04:00
Peter F. Patel-Schneider c77b2a413f device: add descriptor for Logitech MX Revolution Mouse M-RCL 124 2023-09-17 10:39:48 -04:00
Peter F. Patel-Schneider a373a7d439 device: add descriptor for G500s 2023-09-16 10:35:26 -04:00
Peter F. Patel-Schneider 099e825298 device: add new ID for G733 Headset 2023-05-30 15:30:55 -04:00
Peter F. Patel-Schneider d56c7d5a06 device: add bluetooth keyboard C714 2023-05-19 07:14:10 -04:00
Peter F. Patel-Schneider 3a563a18a6 device: add descriptior for EX110 keyboard 2023-04-05 11:12:56 -04:00
I7L0 dc4eb96f36
device: Add support for G535 wireless gaming headset (#2034) 2023-04-05 09:53:06 -04:00
Peter F. Patel-Schneider 85c1260ac6 device: add desccriptor for G9x 2023-02-16 07:39:36 -05:00
Peter F. Patel-Schneider 39f6341a8f device: add descriptor for LX7 mouse 2023-02-11 12:28:01 -05:00
Peter F. Patel-Schneider 2890966b3f device: add descriptor for Illuminated Keyboard USB ID C318 2023-01-16 08:44:56 -05:00
Peter F. Patel-Schneider a51bcfb376 device: allow device descriptors without name and codename 2023-01-03 15:46:24 -05:00
vulpes2 eacbfbd178
device: add description for K470 keyboard from the MK470 combo (#1945) 2022-12-25 20:11:48 -05:00
Peter F. Patel-Schneider 8a3cbc5378 devices: add Logitech PRO Gaming Keyboard 2022-10-06 22:00:38 -04:00
Peter F. Patel-Schneider afaeb7fffb device: add G213 Prodigy Gaming Keyboard 2022-09-13 07:55:31 -04:00
Peter F. Patel-Schneider 5b87ed31da device: add desccriptor for G935 headset 2022-08-10 12:11:48 -04:00
Ben Webb bad8a06cee device: add G502 Proteus Spectrum Optical Mouse 2022-08-09 10:23:31 -04:00
Peter F. Patel-Schneider b717872557 device: add G502 Gaming Mouse 2022-05-11 09:18:09 -04:00
Sören Beye 4c46b1fcc2 device: add G533 headset 2022-04-27 12:05:31 -04:00
Peter F. Patel-Schneider cef531c7be settings: add diversion setting for hires scroll wheel and fix information about lowres scroll setting 2022-04-15 09:13:46 -04:00
Peter F. Patel-Schneider fbe25b4b11 release 1.1.2rc2 2022-03-19 21:25:03 -04:00
Peter F. Patel-Schneider 124414063b device: reformat descriptors.py 2022-03-08 17:48:41 -05:00
Peter F. Patel-Schneider 7239e3d050 device: support G502 SE Hero mouse 2022-03-08 17:48:41 -05:00
Peter F. Patel-Schneider 71ac905d76 device: determine device number from protocol for direct-connected devices; add G9 Laser Mouse 2022-03-02 22:58:25 -05:00
Peter F. Patel-Schneider c16b02e732 device: add G815 keyboard and MX518 mouse 2022-02-22 14:14:07 -05:00
Peter F. Patel-Schneider 12779e7061 device: add G733 headset 2022-01-22 09:51:36 -05:00
Peter F. Patel-Schneider 11fa025f1d settings: use classes for settings 2022-01-22 08:55:54 -05:00
Peter F. Patel-Schneider 6d3d3e2086 device: add G512 keyboard and G402 mouse 2021-12-28 15:53:23 -05:00
Peter F. Patel-Schneider 85b4495443 device: reformat descriptors.py 2021-12-28 15:53:23 -05:00
Peter F. Patel-Schneider fa83e6ebb8 device: add descriptor for Logitech PRO X Wireless Gaming Headset 2021-12-20 09:17:07 -05:00
Hugo Osvaldo Barrera 22bf4fafff Drop unnecessary __future__ imports
These are all active by default on all recent Python versions.
2021-10-30 16:49:41 -04:00
Hugo Osvaldo Barrera b96d16672b Drop obsolete encoding declaration
This was only parsed in Python 2.
Python 3 only supports UTF-8 for source files, and that's what it uses.
2021-10-30 16:49:41 -04:00
Jocelyn Thode 8a2d92834f device: add support for the G914 TKL Keyboard 2021-10-28 12:49:20 -04:00
Jocelyn Thode 10d6a98ca1 device: add support for the PRO X Wireless mouse 2021-10-28 12:49:20 -04:00
Peter F. Patel-Schneider 5480321f49 device: add information for M500S 2021-10-23 23:16:48 -04:00
Peter F. Patel-Schneider 67e40b35e8 device: add G102 mouse 2021-08-22 11:16:41 -04:00