1
0
forked from drath/libratbag

tools flake8 fixes

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer
2019-02-27 14:20:58 +10:00
parent d17868303e
commit 67ee0fab14
2 changed files with 6 additions and 6 deletions

View File

@@ -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

View File

@@ -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):