Peter F. Patel-Schneider
94155dbbf1
cli: fix crash when asking for help about config
2025-03-03 14:09:22 -05:00
MattHag
636f736765
solaar/cli: Remove outdated logger enabled checks
...
Logger enabled checks clutter the code unnecessarily. The checks are
now handled in a custom logger class. Eventually they can be completely
removed in the future.
Related #2664
2025-01-02 09:26:31 -05:00
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
cba3533869
Remove factory wrapper classes
...
A module level function is sufficient, no wrapper needed.
2024-10-11 07:42:38 -04:00
MattHag
ef6b7dec2c
receiver: Remove hard dependency on base
...
With this test all receiver tests are macOS compatible again. The low
level interface supports passing a fake API for unit tests.
2024-10-11 07:42:38 -04:00
MattHag
1729189981
base: Add find_paired_node functions
...
Avoid direct access to hidapi and use the base module as low-level API
instead. This change replaces the remaining calls to find_paired_node
and find_paired_node_wpid by exposing them via base module.
2024-10-11 07:42:38 -04:00
MattHag
46fafa0e68
hidapi: Explicitly load hidapi/udev implementation
...
Linux uses udev, other platforms use the cross-platform hidapi
implementation. Remove implicit loading of hidapi in hidapi/__init__.py.
2024-10-11 07:42:38 -04:00
Peter F. Patel-Schneider
ae39ac46ba
docs: improve documentation for cli actions
2024-08-23 20:03:54 -04:00
MattHag
67829c5807
Clean up imports ( #2537 )
...
* Remove import as _ in solaar startup
Related #2273
* Remove import as _ in listener
Related #2273
* Remove import as _ in cli init
Related #2273
* Remove import as _ in gtk
Related #2273
* Remove import as _ in show
Related #2273
* Remove import as _ in tray
Related #2273
* Remove import as _ in profiles
Related #2273
* Remove import as _ in config
Related #2273
* Remove import as _ in config panel
Related #2273
* Remove import as _ in window
Related #2273
* Remove import as _ in pair
Related #2273
* Remove import as _ in pair window
Related #2273
* Remove import as _ in cli package
Related #2273
* Remove import as _ in ui package
Related #2273
* Remove commented out code
Related #2273
* Use constant for Logitech ID
2024-07-15 08:37:18 -04:00
MattHag
5a63e44d58
Remove empty comment lines
...
Remove hashtags solely used for structuring.
Related #2273
2024-06-02 09:54:21 -04:00
MattHag
c29231bc6b
refactor: Creation of devices ( #2493 )
...
* Refine interfaces for testability
* Reenable fixed device tests
2024-05-27 11:58:16 -04:00
Matthias Hagmann
4e6361429e
refactor: Use f-strings for more exceptions and log message
...
Semi manually convert remaining strings with no translation to f-string.
2024-03-24 07:01:56 -04:00
Matthias Hagmann
5b09ace1f5
ruff: Apply single line import format
...
# Usage
pre-commit run --all-files
Related #2295
2024-03-13 15:41:21 -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
Swapnil Devesh
5ee1c6df30
ui: fix app name casing in UI
...
* Fix app name casing in UI
* Linter fixes
* Only use NAME variable
* FIx linter errors
2024-03-05 12:08:56 -05:00
Matthias Hagmann
8f6e8eef4c
Refactor: Move Device instantiation to factory class
...
Related #2273
2024-03-03 09:32:42 -05:00
Matthias Hagmann
51e44052b0
Refactor: Move Receiver instantiation to factory class
...
Related #2350
2024-03-03 09:32:42 -05:00
Matthias Hagmann
7ef3059b69
clean up: Remove editor specific marks
...
Related #2273
2024-02-29 10:10:46 -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
Peter F. Patel-Schneider
12de240949
device: improve imports in logitech_receiver
...
device: move imports of ui modules to beginning of files
logitech_receiver: remove imports from __init__.py
2024-02-18 06:21:35 -05:00
Peter F. Patel-Schneider
ad6e3dc80e
cli: move imports in __init__.py to top of file
2024-02-18 06:21:35 -05:00
MattHag
87658fb189
logging: Simplify logger instantiation
...
* logging: Simplify logger instantiation
Relates #2254
* logging: Remove aliases
Relates #2254
* logging: Replace deprecated warn with warning
Related #2254
* logging: Fix mistake
Related #2257
2024-02-10 13:55:27 -05:00
Peter F. Patel-Schneider
fb30f4ee41
device: support onboard profiles
2024-02-07 18:48:22 -05:00
Peter F. Patel-Schneider
d7bd55bdf1
device: upgrade messages when no supported device found
2023-08-02 20:34:27 -04:00
ejsc1
0c7a9dd0a7
misc: update isort to current version
...
* Update .pre-commit-config.yaml
* Update solaar
* Update udev.py
* Update __init__.py
* Update gtk.py
* Update i18n.py
* Update listener.py
* Update icons.py
* Update notify.py
* Update hidconsole
* Update gtk.py
* Update icons.py
Co-authored-by: Peter F. Patel-Schneider <pfpschneider@gmail.com>
2022-11-26 13:58:46 -05:00
Peter F. Patel-Schneider
3e90c3bc8a
hidapi: process hid report descriptors to identify devices
2022-10-13 16:14:30 -04:00
Peter F. Patel-Schneider
0b7b037e11
cli: terminate iteration over receiver devices when all have been found
2022-08-23 08:29:15 -04:00
Peter F. Patel-Schneider
4059b377b4
receiver: use last_id as maximum device number not max_devices
2022-08-20 20:12:48 -04:00
Peter F. Patel-Schneider
e190ad39da
cli: make sure device is on-line when searching for devices in solaar show
2022-02-16 11:08:39 -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
Peter F. Patel-Schneider
babdb44b4f
cli: fix up help messages for selecting devices and receivers for CLI commands
2021-02-21 13:23:33 -05:00
Peter F. Patel-Schneider
04d79810d4
cli: set keyed settings with config
2021-02-18 11:02:57 -05:00
Peter F. Patel-Schneider
eb0d939d1a
cli: don't select unpaired device for config command
2021-02-16 08:25:46 -05:00
Peter F. Patel-Schneider
815c9755b5
receiver: handle bluetooth-connected devices
2020-09-29 11:26:34 -04:00
Peter F. Patel-Schneider
aeb8588e06
cli: make probe and config work for wired devices
2020-09-23 18:03:47 -04:00
effective-light
eec5df5d56
device: read the serial number properly from the device hidraw nodes
2020-08-25 06:47:07 -04:00
effective-light
00ea128775
Prevent the precommit hooks from complaining
2020-08-25 06:47:07 -04:00
effective-light
b98033d558
base: add a number of relevant device ids and print them when the "show" command is executed
2020-08-25 06:47:07 -04:00
effective-light
16823092bc
device: add preliminary support for wired devices
2020-08-25 06:47:07 -04:00
Filipe Laíns
27c90fa736
yapf: adjust style to not indent closing brackets
...
Signed-off-by: Filipe Laíns <lains@archlinux.org>
2020-07-07 15:11:15 +01:00
Filipe Laíns
8e89aa0038
yapf: set max line lenght to 127
...
Signed-off-by: Filipe Laíns <lains@archlinux.org>
2020-07-07 15:11:15 +01:00
Filipe Laíns
627185079f
flake8: initial fix
...
Signed-off-by: Filipe Laíns <lains@archlinux.org>
2020-07-07 15:11:15 +01:00
Filipe Laíns
33521558ed
pre-commit: initial fix
...
Signed-off-by: Filipe Laíns <lains@archlinux.org>
2020-07-07 15:11:15 +01:00
Filipe Laíns
e6369e0c3c
isort: intial import fix
...
Signed-off-by: Filipe Laíns <lains@archlinux.org>
2020-07-07 15:11:15 +01:00
Filipe Laíns
72a8d311bc
yapf: change code style to yapf
...
Signed-off-by: Filipe Laíns <lains@archlinux.org>
2020-07-07 15:11:15 +01:00
Peter F. Patel-Schneider
f191d95990
misc: better reporting of errors
2020-06-17 09:53:16 -04:00
Peter F. Patel-Schneider
11465f2b2a
cli: add probe command to show receiver register information
2020-02-18 23:21:59 +00:00
Peter F. Patel-Schneider
0520dde990
receiver: use None for serial number of c534
2020-02-04 22:04:43 +01:00
Mattias Jernberg
350784eb70
Print an error message when assertion fails
2018-08-13 18:36:52 +02:00