diff --git a/gnomemusic/player.py b/gnomemusic/player.py
index eabb283..8ce9153 100644
--- a/gnomemusic/player.py
+++ b/gnomemusic/player.py
@@ -894,7 +894,7 @@ class Player(GObject.GObject):
         timing from the user, for updating the songPlaybackTimeLabel.
         """
         # Don't run until progressScale has been realized
-        if self.progressScale.get_realized() == False:
+        if self.progressScale.get_realized() is False:
             return
 
         # Update self.timeout
diff --git a/gnomemusic/query.py b/gnomemusic/query.py
index 2c92721..24f7c2d 100644
--- a/gnomemusic/query.py
+++ b/gnomemusic/query.py
@@ -38,6 +38,7 @@ sparql_midnight_dateTime_format = "%Y-%m-%dT00:00:00Z"
 SECONDS_PER_DAY = 86400
 PUNCTUATION_FILTER = " !\\\"#$%&'()*+,-./:;<=>?@[\\\\]^_`{|}~"
 
+
 class Query():
 
     music_folder = None
@@ -73,7 +74,7 @@ class Query():
         :return: The sparql order by statement
         :rtype: str
         """
-        return """tracker:title-order(%(attr)s)""" % { 'attr': attr };
+        return """tracker:title-order(%(attr)s)""" % {'attr': attr};
 
     @staticmethod
     def all_albums():
@@ -989,7 +990,7 @@ class Query():
                 FILTER ( tracker:id(?urn) = "%(media_id)s" )
             }
         """.replace('\n', '').strip() % {
-            'media_id' : media_id
+            'media_id': media_id
         }
 
         return query
diff --git a/gnomemusic/views/baseview.py b/gnomemusic/views/baseview.py
index 3dd344e..2052575 100644
--- a/gnomemusic/views/baseview.py
+++ b/gnomemusic/views/baseview.py
@@ -270,10 +270,10 @@ class BaseView(Gtk.Stack):
     def _set_selection(self, value, parent=None):
         count = 0
         itr = self.model.iter_children(parent)
-        while itr != None:
+        while itr is not None:
             if self.model.iter_has_child(itr):
                 count += self._set_selection(value, itr)
-            if self.model[itr][5] != None:
+            if self.model[itr][5] is not None:
                 self.model[itr][6] = value
                 count += 1
             itr = self.model.iter_next(itr)
diff --git a/gnomemusic/views/songsview.py b/gnomemusic/views/songsview.py
index c1b8c3c..9a2b5ab 100644
--- a/gnomemusic/views/songsview.py
+++ b/gnomemusic/views/songsview.py
@@ -90,7 +90,7 @@ class SongsView(BaseView):
 
         try:
             itr = self.model.get_iter(path)
-        except ValueError as err :
+        except ValueError as err:
             logger.warn("Error: {}, {}".format(err.__class__, err))
             return
 
diff --git a/gnomemusic/widgets/disclistboxwidget.py b/gnomemusic/widgets/disclistboxwidget.py
index 328d206..91761c5 100644
--- a/gnomemusic/widgets/disclistboxwidget.py
+++ b/gnomemusic/widgets/disclistboxwidget.py
@@ -381,7 +381,7 @@ class DiscBox(Gtk.Box):
     def _toggle_widget_selection(self, child):
         song_widget = child.get_child()
         song_widget.check_button.set_visible(self._selection_mode)
-        if self._selection_mode == False:
+        if self._selection_mode is False:
             if song_widget.check_button.get_active():
                 song_widget.check_button.set_active(False)
 
diff --git a/gnomemusic/window.py b/gnomemusic/window.py
index 60372d7..9dcd8e8 100644
--- a/gnomemusic/window.py
+++ b/gnomemusic/window.py
@@ -409,7 +409,7 @@ class Window(Gtk.ApplicationWindow):
             # Play / Pause on Ctrl + SPACE
             if (event.keyval == Gdk.KEY_space
                     and event_and_modifiers == Gdk.ModifierType.CONTROL_MASK):
-                 self.player.play_pause()
+                self.player.play_pause()
             # Play previous on Ctrl + B
             if (event.keyval == Gdk.KEY_b
                     and event_and_modifiers == Gdk.ModifierType.CONTROL_MASK):
