diff --git a/openlp/core/lib/eventreceiver.py b/openlp/core/lib/eventreceiver.py index d21e3f167..76b19957c 100644 --- a/openlp/core/lib/eventreceiver.py +++ b/openlp/core/lib/eventreceiver.py @@ -230,7 +230,7 @@ class EventReceiver(QtCore.QObject): self.emit(QtCore.SIGNAL(event), msg) -class Receiver(): +class Receiver(object): """ Class to allow events to be passed from different parts of the system. This is a static wrapper around the ``EventReceiver`` class. As there is only diff --git a/openlp/migration/display.py b/openlp/migration/display.py index 8553f432a..abe991075 100644 --- a/openlp/migration/display.py +++ b/openlp/migration/display.py @@ -27,7 +27,7 @@ import logging log = logging.getLogger(__name__) -class Display(): +class Display(object): log.info(u'Display Class loaded') @staticmethod diff --git a/openlp/migration/migratebibles.py b/openlp/migration/migratebibles.py index 168511a02..17ded3a80 100644 --- a/openlp/migration/migratebibles.py +++ b/openlp/migration/migratebibles.py @@ -27,7 +27,6 @@ import os import sys import sqlite3 -from sqlalchemy import * from sqlalchemy import create_engine from sqlalchemy.orm import scoped_session, sessionmaker, mapper @@ -93,7 +92,7 @@ def init_models(url): autocommit=False, bind=engine)) return session -class MigrateBibles(): +class MigrateBibles(object): def __init__(self, display): self.display = display self.data_path = AppLocation.get_section_data_path(u'bibles') diff --git a/openlp/migration/migratefiles.py b/openlp/migration/migratefiles.py index ceca99718..91fff144d 100644 --- a/openlp/migration/migratefiles.py +++ b/openlp/migration/migratefiles.py @@ -25,7 +25,7 @@ from openlp.core.utils import AppLocation -class MigrateFiles(): +class MigrateFiles(object): def __init__(self, display): self.display = display diff --git a/openlp/migration/migratesongs.py b/openlp/migration/migratesongs.py index 19b77adae..f7624e98c 100644 --- a/openlp/migration/migratesongs.py +++ b/openlp/migration/migratesongs.py @@ -94,7 +94,7 @@ class TSongAuthor(BaseModel): """ pass -class MigrateSongs(): +class MigrateSongs(object): def __init__(self, display): self.display = display self.data_path = AppLocation.get_section_data_path(u'songs') diff --git a/openlp/plugins/alerts/lib/manager.py b/openlp/plugins/alerts/lib/manager.py index f82266f49..9d9c87fbb 100644 --- a/openlp/plugins/alerts/lib/manager.py +++ b/openlp/plugins/alerts/lib/manager.py @@ -32,7 +32,7 @@ from openlp.plugins.alerts.lib.models import init_models, metadata, AlertItem log = logging.getLogger(__name__) -class DBManager(): +class DBManager(object): """ The Song Manager provides a central location for all database code. This class takes care of connecting to the database and running all the queries. @@ -70,13 +70,13 @@ class DBManager(): """ return self.session.query(AlertItem).order_by(AlertItem.text).all() - def save_alert(self, AlertItem): + def save_alert(self, alert_item): """ Saves a Alert show to the database """ log.debug(u'Alert added') try: - self.session.add(AlertItem) + self.session.add(alert_item) self.session.commit() log.debug(u'Alert saved') return True @@ -99,9 +99,9 @@ class DBManager(): Delete a Alert show """ if id != 0: - AlertItem = self.get_alert(id) + alert_item = self.get_alert(id) try: - self.session.delete(AlertItem) + self.session.delete(alert_item) self.session.commit() return True except: @@ -110,3 +110,4 @@ class DBManager(): return False else: return True + diff --git a/openlp/plugins/custom/lib/manager.py b/openlp/plugins/custom/lib/manager.py index 9e781f560..b5e0e8411 100644 --- a/openlp/plugins/custom/lib/manager.py +++ b/openlp/plugins/custom/lib/manager.py @@ -32,7 +32,7 @@ from openlp.plugins.custom.lib.models import init_models, metadata, CustomSlide log = logging.getLogger(__name__) -class CustomManager(): +class CustomManager(object): """ The Song Manager provides a central location for all database code. This class takes care of connecting to the database and running all the queries. diff --git a/openlp/plugins/songusage/lib/manager.py b/openlp/plugins/songusage/lib/manager.py index e8816b552..cb8ea91bf 100644 --- a/openlp/plugins/songusage/lib/manager.py +++ b/openlp/plugins/songusage/lib/manager.py @@ -33,7 +33,7 @@ from openlp.plugins.songusage.lib.models import init_models, metadata, \ log = logging.getLogger(__name__) -class SongUsageManager(): +class SongUsageManager(object): """ The Song Manager provides a central location for all database code. This class takes care of connecting to the database and running all the queries.