forked from drath/libratbag
tools flake8 fixes
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
@@ -53,7 +53,7 @@ class MetaRatbag(type):
|
|||||||
c.__late_init__()
|
c.__late_init__()
|
||||||
|
|
||||||
# Add a noop self.notify() so we're compatible with GObjects
|
# Add a noop self.notify() so we're compatible with GObjects
|
||||||
c.notify = lambda *args : None
|
c.notify = lambda *args: None
|
||||||
|
|
||||||
return c
|
return c
|
||||||
|
|
||||||
|
|||||||
@@ -569,9 +569,9 @@ class RatbagdResolution(_RatbagdDBus):
|
|||||||
if len(res) != len(resolution) or len(res) > 2:
|
if len(res) != len(resolution) or len(res) > 2:
|
||||||
raise ValueError('invalid resolution precision')
|
raise ValueError('invalid resolution precision')
|
||||||
if len(res) == 1:
|
if len(res) == 1:
|
||||||
variant = GLib.Variant('u', resolution[0]);
|
variant = GLib.Variant('u', resolution[0])
|
||||||
else:
|
else:
|
||||||
variant = GLib.Variant('(uu)', resolution);
|
variant = GLib.Variant('(uu)', resolution)
|
||||||
self._set_dbus_property("Resolution", "v", variant)
|
self._set_dbus_property("Resolution", "v", variant)
|
||||||
|
|
||||||
@GObject.Property
|
@GObject.Property
|
||||||
@@ -703,7 +703,7 @@ class RatbagdButton(_RatbagdDBus):
|
|||||||
"""
|
"""
|
||||||
button = GLib.Variant("u", button)
|
button = GLib.Variant("u", button)
|
||||||
self._set_dbus_property("Mapping", "(uv)",
|
self._set_dbus_property("Mapping", "(uv)",
|
||||||
(RatbagdButton.ACTION_TYPE_BUTTON, button))
|
(RatbagdButton.ACTION_TYPE_BUTTON, button))
|
||||||
|
|
||||||
@GObject.Property
|
@GObject.Property
|
||||||
def macro(self):
|
def macro(self):
|
||||||
@@ -724,7 +724,7 @@ class RatbagdButton(_RatbagdDBus):
|
|||||||
"""
|
"""
|
||||||
macro = GLib.Variant("a(uu)", macro.keys)
|
macro = GLib.Variant("a(uu)", macro.keys)
|
||||||
self._set_dbus_property("Mapping", "(uv)",
|
self._set_dbus_property("Mapping", "(uv)",
|
||||||
(RatbagdButton.ACTION_TYPE_MACRO, macro))
|
(RatbagdButton.ACTION_TYPE_MACRO, macro))
|
||||||
|
|
||||||
@GObject.Property
|
@GObject.Property
|
||||||
def special(self):
|
def special(self):
|
||||||
@@ -743,7 +743,7 @@ class RatbagdButton(_RatbagdDBus):
|
|||||||
"""
|
"""
|
||||||
special = GLib.Variant("u", special)
|
special = GLib.Variant("u", special)
|
||||||
self._set_dbus_property("Mapping", "(uv)",
|
self._set_dbus_property("Mapping", "(uv)",
|
||||||
(RatbagdButton.ACTION_TYPE_SPECIAL, special))
|
(RatbagdButton.ACTION_TYPE_SPECIAL, special))
|
||||||
|
|
||||||
@GObject.Property
|
@GObject.Property
|
||||||
def action_type(self):
|
def action_type(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user