Commit c855efb4 authored by Marinus Schraal's avatar Marinus Schraal

Fix warnings with new Flake8

parent 920878a9
Pipeline #39751 passed with stages
in 13 minutes and 21 seconds
......@@ -84,8 +84,9 @@ class TrackerWrapper:
self.tracker = Tracker.SparqlConnection.get(None)
except Exception as e:
from sys import exit
logger.error("Cannot connect to tracker, error '%s'\Exiting",
str(e))
logger.error(
"Cannot connect to tracker, error {}\nExiting".format(
str(e)))
exit(1)
def __str__(self):
......
......@@ -651,8 +651,8 @@ class RemoteArt(GObject.GObject):
# FIXME: Passing the iostream here, otherwise it gets
# closed. PyGI specific issue?
ostream.splice_async(
istream, Gio.OutputStreamSpliceFlags.CLOSE_SOURCE |
Gio.OutputStreamSpliceFlags.CLOSE_TARGET, GLib.PRIORITY_LOW,
istream, Gio.OutputStreamSpliceFlags.CLOSE_SOURCE
| Gio.OutputStreamSpliceFlags.CLOSE_TARGET, GLib.PRIORITY_LOW,
None, self._splice_callback, [tmp_file, iostream])
@log
......
......@@ -521,8 +521,8 @@ class Player(GObject.GObject):
self._playlist.connect('song-validated', self._on_song_validated)
self._playlist.bind_property(
'repeat-mode', self, 'repeat-mode',
GObject.BindingFlags.SYNC_CREATE |
GObject.BindingFlags.BIDIRECTIONAL)
GObject.BindingFlags.SYNC_CREATE
| GObject.BindingFlags.BIDIRECTIONAL)
self._new_clock = True
......
......@@ -82,8 +82,8 @@ class AlbumCover(Gtk.FlowBoxChild):
self.bind_property(
'selected', self._check, 'active',
GObject.BindingFlags.BIDIRECTIONAL |
GObject.BindingFlags.SYNC_CREATE)
GObject.BindingFlags.BIDIRECTIONAL
| GObject.BindingFlags.SYNC_CREATE)
self.bind_property(
'selection-mode', self._check, 'visible',
GObject.BindingFlags.BIDIRECTIONAL)
......
......@@ -87,8 +87,8 @@ class AlbumWidget(Gtk.EventBox):
self.bind_property(
'selection-mode', self._parent_view, 'selection-mode',
GObject.BindingFlags.BIDIRECTIONAL |
GObject.BindingFlags.SYNC_CREATE)
GObject.BindingFlags.BIDIRECTIONAL
| GObject.BindingFlags.SYNC_CREATE)
self.bind_property(
'selected-items-count', self._parent_view, 'selected-items-count')
......
......@@ -128,8 +128,8 @@ class ArtistAlbumsWidget(Gtk.Box):
self.bind_property(
'selection-mode', widget, 'selection-mode',
GObject.BindingFlags.BIDIRECTIONAL |
GObject.BindingFlags.SYNC_CREATE)
GObject.BindingFlags.BIDIRECTIONAL
| GObject.BindingFlags.SYNC_CREATE)
self._album_box.pack_start(widget, False, False, 0)
self._widgets.append(widget)
......
......@@ -79,8 +79,8 @@ class ArtistAlbumWidget(Gtk.Box):
self.bind_property(
'selection-mode', self._disc_list_box, 'selection-mode',
GObject.BindingFlags.BIDIRECTIONAL |
GObject.BindingFlags.SYNC_CREATE)
GObject.BindingFlags.BIDIRECTIONAL
| GObject.BindingFlags.SYNC_CREATE)
self._title.props.label = self._album_title
year = utils.get_media_year(self._media)
......
......@@ -306,8 +306,8 @@ class DiscListBox(Gtk.Box):
self.bind_property(
'selection-mode', widget, 'selection-mode',
GObject.BindingFlags.BIDIRECTIONAL |
GObject.BindingFlags.SYNC_CREATE)
GObject.BindingFlags.BIDIRECTIONAL
| GObject.BindingFlags.SYNC_CREATE)
self.bind_property(
'selection-mode-allowed', widget, 'selection-mode-allowed',
GObject.BindingFlags.SYNC_CREATE)
......
......@@ -122,8 +122,8 @@ class HeaderBar(Gtk.HeaderBar):
self.bind_property(
"selection-mode", self, "show-close-button",
GObject.BindingFlags.INVERT_BOOLEAN |
GObject.BindingFlags.SYNC_CREATE)
GObject.BindingFlags.INVERT_BOOLEAN
| GObject.BindingFlags.SYNC_CREATE)
self.bind_property(
"selection-mode", self._cancel_button, "visible")
self.bind_property(
......@@ -134,15 +134,15 @@ class HeaderBar(Gtk.HeaderBar):
GObject.BindingFlags.BIDIRECTIONAL)
self.bind_property(
"stack", self._stack_switcher, "stack",
GObject.BindingFlags.BIDIRECTIONAL |
GObject.BindingFlags.SYNC_CREATE)
GObject.BindingFlags.BIDIRECTIONAL
| GObject.BindingFlags.SYNC_CREATE)
self.bind_property(
"selected-items-count", self._selection_menu,
"selected-items-count")
self.bind_property(
"search-mode-enabled", self._search_button, "active",
GObject.BindingFlags.BIDIRECTIONAL |
GObject.BindingFlags.SYNC_CREATE)
GObject.BindingFlags.BIDIRECTIONAL
| GObject.BindingFlags.SYNC_CREATE)
self.connect(
"notify::selection-mode-allowed",
......
......@@ -111,8 +111,8 @@ class SongWidget(Gtk.EventBox):
self.bind_property(
'selected', self._select_button, 'active',
GObject.BindingFlags.BIDIRECTIONAL |
GObject.BindingFlags.SYNC_CREATE)
GObject.BindingFlags.BIDIRECTIONAL
| GObject.BindingFlags.SYNC_CREATE)
self.bind_property(
'show-duration', self._duration_label, 'visible',
GObject.BindingFlags.SYNC_CREATE)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment