From 90cbf3a3ca7604757143241a5d33f3b6e2d30e2e Mon Sep 17 00:00:00 2001 From: Arkadiy Illarionov Date: Sun, 5 Nov 2023 21:28:40 +0300 Subject: [PATCH] Fix lint warnings --- apprise/plugins/NotifyDBus.py | 3 ++- test/test_plugin_glib.py | 12 ++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/apprise/plugins/NotifyDBus.py b/apprise/plugins/NotifyDBus.py index 69bf93e156..6538717868 100644 --- a/apprise/plugins/NotifyDBus.py +++ b/apprise/plugins/NotifyDBus.py @@ -231,7 +231,8 @@ def __init__(self, urgency=None, x_axis=None, y_axis=None, except (TypeError, ValueError): # Invalid x/y values specified - msg = f'The x,y coordinates specified ({x_axis},{y_axis}) are invalid.' + msg = 'The x,y coordinates specified ({},{}) are invalid.'\ + .format(x_axis, y_axis) self.logger.warning(msg) raise TypeError(msg) else: diff --git a/test/test_plugin_glib.py b/test/test_plugin_glib.py index 502e988a90..dc5edcc41a 100644 --- a/test/test_plugin_glib.py +++ b/test/test_plugin_glib.py @@ -47,9 +47,9 @@ pytest.skip("Skipping dbus-python based tests", allow_module_level=True) -import gi +import gi # noqa E402 gi.require_version("GLib", "2.0") -from gi.repository import GLib +from gi.repository import GLib # noqa E402 from apprise.plugins.NotifyDBus import DBusUrgency, NotifyDBus # noqa E402 @@ -438,7 +438,10 @@ def test_plugin_dbus_module_croaks(mocker, dbus_glib_environment): # Make importing `gi.repository.Gio` raise an ImportError. mocker.patch.dict( - sys.modules, {'gi.repository.Gio': compile('raise ImportError()', 'gi.repository.Gio', 'exec')}) + sys.modules, + {'gi.repository.Gio': compile('raise ImportError()', + 'gi.repository.Gio', + 'exec')}) # When patching something which has a side effect on the module-level code # of a plugin, make sure to reload it. @@ -455,7 +458,8 @@ def test_plugin_dbus_session_croaks(mocker, dbus_glib_environment): Verify notification fails if DBus croaks. """ - mocker.patch('gi.repository.Gio.DBusProxy.new_for_bus_sync', side_effect=GLib.Error('test')) + mocker.patch('gi.repository.Gio.DBusProxy.new_for_bus_sync', + side_effect=GLib.Error('test')) setup_glib_environment() obj = apprise.Apprise.instantiate('dbus://', suppress_exceptions=False)