@@ -255,7 +255,7 @@ def set_theme(self, theme: str):
255255
256256class DBusPlugin (Plugin ):
257257 """A class for plugins that mainly switching theme via DBus"""
258-
258+
259259 def __init__ (self ):
260260 super ().__init__ ()
261261 self .connection = QDBusConnection .sessionBus ()
@@ -280,8 +280,9 @@ def list_paths(self, service: str, path: str) -> List[str]:
280280 """ Get all subpath under a given pth of service
281281 :path: should start with / but without / on its end
282282 """
283-
284- assert path .startswith ('/' ) and not path .endswith ('/' ), "list_paths wrong, :path: should start with / but without / on its end"
283+
284+ assert path .startswith ('/' ) and not path .endswith ('/' ), \
285+ "list_paths wrong, :path: should start with / but without / on its end"
285286 msg = QDBusMessage .createMethodCall (service , path , "org.freedesktop.DBus.Introspectable" , "Introspect" )
286287 reply = self .connection .call (msg )
287288 if reply .errorName ():
@@ -314,7 +315,7 @@ def open_config(self, path: Path):
314315 case FileFormat .JSON .value :
315316 try :
316317 return json .load (file )
317- except json .decoder .JSONDecodeError as e :
318+ except json .decoder .JSONDecodeError :
318319 return self .default_config
319320 case FileFormat .CONFIG .value :
320321 config = ConfigParser ()
@@ -385,6 +386,7 @@ def flatpak_user(app_id: str) -> Path:
385386def snap_path (app : str ) -> Path :
386387 return Path (f'/var/lib/snapd/snap/{ app } /current' )
387388
389+
388390def themes_from_theme_directories (type : str ) -> List [Path ]:
389391 theme_directories = [
390392 Path ('/usr/share/themes' ),
0 commit comments