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
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
* 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
ui: move imports in about.py to top of file
ui: move imports to top of notify.py
ui: move imports to top of window.py
ui: reorder imports at beginning of __init__.py
ui: move imports to top of tray.py
ui: move common code out of __init__.py to common.py
ui: move imports to top of __init___.py
The application advertises itself as io.github.pwr_solaar.solaar through
its appdata file, so name the application this way too.
This fixes this warning in Flatpak:
Failed to register: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: org.freedesktop.DBus.Error.ServiceUnknown
This fixes the python 3.7 incompatibilities arising from 'async'
becoming a reserved word.
The file lib/solaar/async.py is renamed to asks.py. I picked the name
because it defines the TaskRunner class and it's the best I could come
up in fifteen seconds.
The async function in solar/ui/__init__.py is renamed to ui_async, and
the various imports of that function are changed to match.
Without this patch it doesn't build at all. I am running with this
patch applied and everything appears to work as expected.
Signed-off-by: Jason Tibbitts <tibbs@math.uh.edu>
The main window suddenly opening when a battery is critical is very
disruptive. It can pop up on all sort of undesirable scenarios.
Rather than catch users of guard, merely show a notification that the
battery is critical.