Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
linkfrg committed Aug 5, 2024
1 parent 163eac9 commit 315d7de
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 8 deletions.
1 change: 0 additions & 1 deletion ignis/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,5 +353,4 @@ def __Quit(self, invocation) -> None:
self.quit()



app = IgnisApp()
1 change: 1 addition & 0 deletions ignis/base_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class BaseWidget(Gtk.Widget, IgnisGObject):
The base class for all widgets.
Provides ``style`` property and allows overriding enums.
"""

gproperties = __gproperties__ = {}
_overrided_enums = {}

Expand Down
14 changes: 12 additions & 2 deletions ignis/dbus.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ def methods(self) -> dict:
def properties(self) -> dict:
return self._properties

def __export_object(self, connection: Gio.DBusConnection, info: Gio.DBusInterfaceInfo) -> None:
def __export_object(
self, connection: Gio.DBusConnection, info: Gio.DBusInterfaceInfo
) -> None:
self._connection = connection
self._connection.register_object(
self._object_path,
Expand Down Expand Up @@ -124,7 +126,14 @@ def callback(func: callable, unpacked_params) -> None:
target=params.unpack, callback=lambda result: callback(func, result)
)

def __handle_get_property(self, connection: Gio.DBusConnection, sender: str, object_path: str, interface: str, value: str) -> GLib.Variant:
def __handle_get_property(
self,
connection: Gio.DBusConnection,
sender: str,
object_path: str,
interface: str,
value: str,
) -> GLib.Variant:
func = self._properties.get(value, None)
if func:
return func()
Expand Down Expand Up @@ -213,6 +222,7 @@ class DBusProxy(IgnisGObject):
value = proxy.MyValue
print(value)
"""

def __init__(
self,
name: str,
Expand Down
2 changes: 2 additions & 0 deletions ignis/dbus_menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ class MenuItem(GObject.Object):
"""
:meta private:
"""

def __init__(
self,
proxy: DBusProxy,
Expand Down Expand Up @@ -42,6 +43,7 @@ class DBusMenu(Gtk.PopoverMenu):
name (``str``): A bus name (well-known or unique).
object_path(``str``): An object path to menu.
"""

def __init__(self, name: str, object_path: str):
super().__init__()
self.__proxy = DBusProxy(
Expand Down
4 changes: 1 addition & 3 deletions ignis/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ def set_process_name(name):

def print_version(ctx, param, value):
if value:
ctx.exit(
print(f"Ignis {Utils.get_ignis_version()} {Utils.get_ignis_commit()}")
)
ctx.exit(print(f"Ignis {Utils.get_ignis_version()} {Utils.get_ignis_commit()}"))


def call_client_func(name: str, *args) -> None:
Expand Down
4 changes: 3 additions & 1 deletion ignis/services/mpris.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ def __init__(self, name: str):

self.__player_proxy.proxy.connect("g-properties-changed", self.__sync)

self.__mpris_proxy.watch_name(on_name_vanished=lambda *args: self.emit("closed"))
self.__mpris_proxy.watch_name(
on_name_vanished=lambda *args: self.emit("closed")
)

self.__ready()

Expand Down
2 changes: 1 addition & 1 deletion ignis/widgets/icon.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class Icon(Gtk.Image, BaseWidget):

def __init__(self, pixel_size: int = -1, **kwargs):
Gtk.Image.__init__(self)
self.pixel_size = pixel_size # this need to set pixel_size BEFORE image
self.pixel_size = pixel_size # this need to set pixel_size BEFORE image
BaseWidget.__init__(self, **kwargs)

@GObject.Property
Expand Down

0 comments on commit 315d7de

Please sign in to comment.