diff --git a/cnvdb.py b/cnvdb.py index 02b855bf2..1e1acdd32 100755 --- a/cnvdb.py +++ b/cnvdb.py @@ -25,7 +25,6 @@ import codecs import sys -import chardet def convert_file(inname, outname): """ diff --git a/demo.py b/demo.py index cd017665c..f88bbb3dd 100644 --- a/demo.py +++ b/demo.py @@ -25,7 +25,7 @@ import sys import time -from PyQt4 import QtGui, QtCore +from PyQt4 import QtGui from openlp.core import Renderer from openlp.theme import Theme diff --git a/documentation/source/conf.py b/documentation/source/conf.py index 6f3aca825..86ad3b7de 100644 --- a/documentation/source/conf.py +++ b/documentation/source/conf.py @@ -11,7 +11,8 @@ # All configuration values have a default; values that are commented out # serve to show the default. -import sys, os +import os +import sys # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the diff --git a/openlp/core/lib/baselistwithdnd.py b/openlp/core/lib/baselistwithdnd.py index 89d56f5f6..60b001402 100644 --- a/openlp/core/lib/baselistwithdnd.py +++ b/openlp/core/lib/baselistwithdnd.py @@ -22,12 +22,9 @@ # Temple Place, Suite 330, Boston, MA 02111-1307 USA # ############################################################################### -import types - from PyQt4 import QtCore, QtGui from openlp.core.lib.toolbar import * -from openlp.core.lib import translate class BaseListWithDnD(QtGui.QListWidget): """ diff --git a/openlp/core/lib/dockwidget.py b/openlp/core/lib/dockwidget.py index 12088c0f3..50b8fe51a 100644 --- a/openlp/core/lib/dockwidget.py +++ b/openlp/core/lib/dockwidget.py @@ -22,10 +22,9 @@ # Temple Place, Suite 330, Boston, MA 02111-1307 USA # ############################################################################### -import types import logging -from PyQt4 import QtCore, QtGui +from PyQt4 import QtGui class OpenLPDockWidget(QtGui.QDockWidget): """ diff --git a/openlp/core/lib/renderer.py b/openlp/core/lib/renderer.py index 3d463ead1..a3b5b232c 100644 --- a/openlp/core/lib/renderer.py +++ b/openlp/core/lib/renderer.py @@ -23,8 +23,6 @@ ############################################################################### import logging -import os -import sys from PyQt4 import QtGui, QtCore diff --git a/openlp/core/lib/rendermanager.py b/openlp/core/lib/rendermanager.py index 191e3483d..e785f83b5 100644 --- a/openlp/core/lib/rendermanager.py +++ b/openlp/core/lib/rendermanager.py @@ -23,9 +23,6 @@ ############################################################################### import logging -import os -import sys -import linecache from PyQt4 import QtGui, QtCore diff --git a/openlp/core/lib/serviceitem.py b/openlp/core/lib/serviceitem.py index 7996fe788..e5a5cde66 100644 --- a/openlp/core/lib/serviceitem.py +++ b/openlp/core/lib/serviceitem.py @@ -24,9 +24,8 @@ import logging import os -import time -from PyQt4 import QtCore, QtGui +from PyQt4 import QtGui from openlp.core.lib import buildIcon diff --git a/openlp/core/lib/settingstab.py b/openlp/core/lib/settingstab.py index 6069dc7fc..0bd0b0074 100644 --- a/openlp/core/lib/settingstab.py +++ b/openlp/core/lib/settingstab.py @@ -22,7 +22,7 @@ # Temple Place, Suite 330, Boston, MA 02111-1307 USA # ############################################################################### -from PyQt4 import QtCore, QtGui +from PyQt4 import QtGui from openlp.core.lib import PluginConfig diff --git a/openlp/core/lib/themexmlhandler.py b/openlp/core/lib/themexmlhandler.py index f5fe4044e..fb1a45571 100644 --- a/openlp/core/lib/themexmlhandler.py +++ b/openlp/core/lib/themexmlhandler.py @@ -25,7 +25,7 @@ import os from xml.dom.minidom import Document -from xml.etree.ElementTree import ElementTree, XML, dump +from xml.etree.ElementTree import ElementTree, XML from openlp.core.lib import str_to_bool diff --git a/openlp/core/lib/xmlrootclass.py b/openlp/core/lib/xmlrootclass.py index 5678de754..07cf5a119 100644 --- a/openlp/core/lib/xmlrootclass.py +++ b/openlp/core/lib/xmlrootclass.py @@ -22,9 +22,8 @@ # Temple Place, Suite 330, Boston, MA 02111-1307 USA # ############################################################################### -import platform -import sys import os +import sys from types import StringType, NoneType, UnicodeType from xml.etree.ElementTree import ElementTree, XML diff --git a/openlp/core/test/test_mediamanageritem.py b/openlp/core/test/test_mediamanageritem.py index 5461e62d2..369b81dba 100644 --- a/openlp/core/test/test_mediamanageritem.py +++ b/openlp/core/test/test_mediamanageritem.py @@ -1,5 +1,11 @@ -from PyQt4 import QtCore, QtGui import logging +import os +import sys + +from PyQt4 import QtCore, QtGui + +from openlp.core.lib import MediaManagerItem + logging.basicConfig(level=logging.DEBUG, format='%(asctime)s %(name)-30s %(levelname)-8s %(message)s', datefmt='%m-%d %H:%M', @@ -12,14 +18,11 @@ formatter = logging.Formatter(u'%(name)24s: %(levelname)-8s %(message)s') # tell the handler to use this format console.setFormatter(formatter) logging.getLogger(u'').addHandler(console) -log=logging.getLogger(u'') - +log = logging.getLogger(u'') logging.info(u'Logging started') -import os, sys -mypath=os.path.split(os.path.abspath(__file__))[0] - +mypath = os.path.split(os.path.abspath(__file__))[0] sys.path.insert(0,(os.path.join(mypath, '..' ,'..', '..'))) -from openlp.core.lib import MediaManagerItem + class TestMediaManager: def setup_class(self): self.app = QtGui.QApplication([]) diff --git a/openlp/core/test/test_plugin_manager.py b/openlp/core/test/test_plugin_manager.py index d8dac432e..1bc47d6d2 100644 --- a/openlp/core/test/test_plugin_manager.py +++ b/openlp/core/test/test_plugin_manager.py @@ -1,5 +1,7 @@ import logging -import os, sys +import os +import sys + from openlp.core.lib.pluginmanager import PluginManager logging.basicConfig(level=logging.DEBUG, @@ -14,11 +16,9 @@ formatter = logging.Formatter(u'%(name)-12s: %(levelname)-8s %(message)s') # tell the handler to use this format console.setFormatter(formatter) logging.getLogger(u'').addHandler(console) -log=logging.getLogger(u'') - +log = logging.getLogger(u'') logging.info(u'Logging started') -mypath=os.path.split(os.path.abspath(__file__))[0] - +mypath = os.path.split(os.path.abspath(__file__))[0] sys.path.insert(0,(os.path.join(mypath, '..' ,'..', '..'))) # test the plugin manager with some plugins in the test_plugins directory diff --git a/openlp/core/test/test_render.py b/openlp/core/test/test_render.py index e7955316a..2ff8990ef 100644 --- a/openlp/core/test/test_render.py +++ b/openlp/core/test/test_render.py @@ -16,9 +16,9 @@ this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA """ -import time import sys import os, os.path + from PyQt4 import QtGui, QtCore from openlp.core.theme import Theme diff --git a/openlp/core/test/test_render_theme.py b/openlp/core/test/test_render_theme.py index f0f9e9933..54f4e6068 100644 --- a/openlp/core/test/test_render_theme.py +++ b/openlp/core/test/test_render_theme.py @@ -21,7 +21,6 @@ import os from PyQt4 import QtGui, QtCore from openlp.core.theme import Theme -from openlp.core import Renderer from test_render import TestRender_base, whoami pypath = os.path.split(os.path.abspath(__file__))[0] diff --git a/openlp/core/theme/theme.py b/openlp/core/theme/theme.py index ff468a88e..f745dc5f9 100644 --- a/openlp/core/theme/theme.py +++ b/openlp/core/theme/theme.py @@ -22,10 +22,9 @@ # Temple Place, Suite 330, Boston, MA 02111-1307 USA # ############################################################################### -import platform import types -from xml.etree.ElementTree import ElementTree, XML +from xml.etree.ElementTree import ElementTree, XML from PyQt4 import QtGui DelphiColors={"clRed":0xFF0000, diff --git a/openlp/core/ui/__init__.py b/openlp/core/ui/__init__.py index a55d2c2b0..7ffb77463 100644 --- a/openlp/core/ui/__init__.py +++ b/openlp/core/ui/__init__.py @@ -38,6 +38,6 @@ from servicemanager import ServiceManager from thememanager import ThemeManager from mainwindow import MainWindow -__all__ = ['SplashScreen', 'AboutForm', 'SettingsForm', 'MasterToolbar', - 'MainWindow', 'MainDisplay', 'SlideController', 'ServiceManager', - 'ThemeManager', 'AmendThemeForm'] +__all__ = ['SplashScreen', 'AboutForm', 'SettingsForm', 'MainWindow', + 'MainDisplay', 'SlideController', 'ServiceManager', 'ThemeManager', + 'AmendThemeForm'] diff --git a/openlp/core/ui/amendthemeform.py b/openlp/core/ui/amendthemeform.py index 9e9e36cbb..66c720261 100644 --- a/openlp/core/ui/amendthemeform.py +++ b/openlp/core/ui/amendthemeform.py @@ -26,9 +26,8 @@ import logging import os, os.path from PyQt4 import QtCore, QtGui -from openlp.core.lib import ThemeXML, Renderer, file_to_xml, str_to_bool, \ - translate +from openlp.core.lib import ThemeXML, file_to_xml, translate from amendthemedialog import Ui_AmendThemeDialog log = logging.getLogger(u'AmendThemeForm') diff --git a/openlp/core/ui/maindisplay.py b/openlp/core/ui/maindisplay.py index d7cbafd8d..47df8c335 100644 --- a/openlp/core/ui/maindisplay.py +++ b/openlp/core/ui/maindisplay.py @@ -25,8 +25,7 @@ import logging from PyQt4 import QtCore, QtGui -from time import sleep -from openlp.core.lib import translate, Receiver +from openlp.core.lib import Receiver class MainDisplay(QtGui.QWidget): """ diff --git a/openlp/core/ui/mainwindow.py b/openlp/core/ui/mainwindow.py index 80799b7bb..252e6d6f0 100644 --- a/openlp/core/ui/mainwindow.py +++ b/openlp/core/ui/mainwindow.py @@ -30,11 +30,9 @@ from PyQt4 import QtCore, QtGui from openlp.core.ui import AboutForm, SettingsForm, AlertForm, \ ServiceManager, ThemeManager, MainDisplay, SlideController, \ PluginForm -from openlp.core.lib import translate, Plugin, MediaManagerItem, \ - SettingsTab, RenderManager, PluginConfig, str_to_bool, OpenLPDockWidget, \ - SettingsManager, PluginManager, Receiver +from openlp.core.lib import translate, RenderManager, PluginConfig, \ + OpenLPDockWidget, SettingsManager, PluginManager, Receiver -from openlp.core.utils import ConfigHelper class Ui_MainWindow(object): def setupUi(self, MainWindow): diff --git a/openlp/core/ui/servicemanager.py b/openlp/core/ui/servicemanager.py index 66c362668..2cf7b03ed 100644 --- a/openlp/core/ui/servicemanager.py +++ b/openlp/core/ui/servicemanager.py @@ -23,18 +23,14 @@ ############################################################################### import os -import sys import string import logging import cPickle import zipfile -import shutil from PyQt4 import QtCore, QtGui from openlp.core.lib import PluginConfig, OpenLPToolbar, ServiceItem, \ - RenderManager, translate, buildIcon, ServiceType, \ - contextMenuAction, contextMenuSeparator, Receiver -from openlp.core.utils import ConfigHelper + translate, ServiceType, contextMenuAction, contextMenuSeparator, Receiver class ServiceManagerList(QtGui.QTreeWidget): diff --git a/openlp/core/ui/settingsform.py b/openlp/core/ui/settingsform.py index e359a197b..d622bd1b2 100644 --- a/openlp/core/ui/settingsform.py +++ b/openlp/core/ui/settingsform.py @@ -24,9 +24,8 @@ import logging -from PyQt4 import QtCore, QtGui +from PyQt4 import QtGui -from openlp.core.lib import SettingsTab from openlp.core.ui import GeneralTab, ThemesTab, AlertsTab from settingsdialog import Ui_SettingsDialog diff --git a/openlp/core/ui/slidecontroller.py b/openlp/core/ui/slidecontroller.py index b26b4eacc..586e07718 100644 --- a/openlp/core/ui/slidecontroller.py +++ b/openlp/core/ui/slidecontroller.py @@ -23,12 +23,10 @@ ############################################################################### import logging -import os import time from PyQt4 import QtCore, QtGui -from openlp.core.lib import OpenLPToolbar, translate, buildIcon, Receiver, \ - ServiceType, RenderManager, SettingsManager +from openlp.core.lib import OpenLPToolbar, translate, Receiver, ServiceType, class SlideList(QtGui.QTableWidget): """ diff --git a/openlp/core/ui/test/test_service_manager.py b/openlp/core/ui/test/test_service_manager.py index 40e69f9ca..05c919eb2 100644 --- a/openlp/core/ui/test/test_service_manager.py +++ b/openlp/core/ui/test/test_service_manager.py @@ -16,20 +16,18 @@ this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA """ -import time import sys import os, os.path import logging -from PyQt4 import QtGui, QtCore -from PyQt4.QtCore import * -from PyQt4.QtGui import * -mypath = os.path.split(os.path.abspath(__file__))[0] -sys.path.insert(0, (os.path.join(mypath, '..', '..', '..', '..'))) +from PyQt4 import QtGui from openlp.core.ui import ServiceManager from openlp.plugins.images.lib import ImageServiceItem +mypath = os.path.split(os.path.abspath(__file__))[0] +sys.path.insert(0, (os.path.join(mypath, '..', '..', '..', '..'))) + logging.basicConfig(filename='test_service_manager.log', level=logging.INFO, filemode='w') diff --git a/openlp/core/ui/thememanager.py b/openlp/core/ui/thememanager.py index d26702ca7..3a00bb23b 100644 --- a/openlp/core/ui/thememanager.py +++ b/openlp/core/ui/thememanager.py @@ -23,7 +23,6 @@ ############################################################################### import os -import sys import zipfile import shutil import logging @@ -31,10 +30,10 @@ import logging from xml.etree.ElementTree import ElementTree, XML from PyQt4 import QtCore, QtGui -from openlp.core.ui import AmendThemeForm, ServiceManager +from openlp.core.ui import AmendThemeForm from openlp.core.theme import Theme -from openlp.core.lib import PluginConfig, OpenLPToolbar, ThemeXML, Renderer, \ - translate, str_to_bool, file_to_xml, buildIcon, Receiver +from openlp.core.lib import PluginConfig, OpenLPToolbar, ThemeXML, translate, \ + str_to_bool, file_to_xml, buildIcon, Receiver from openlp.core.utils import ConfigHelper class ThemeManager(QtGui.QWidget): diff --git a/openlp/core/utils/registry.py b/openlp/core/utils/registry.py index 90cd5fcde..3a1ceb520 100644 --- a/openlp/core/utils/registry.py +++ b/openlp/core/utils/registry.py @@ -23,7 +23,7 @@ ############################################################################### import os -import sys + from ConfigParser import SafeConfigParser class Registry(object): diff --git a/openlp/migration/migratebibles.py b/openlp/migration/migratebibles.py index c8067eb52..59936a87d 100644 --- a/openlp/migration/migratebibles.py +++ b/openlp/migration/migratebibles.py @@ -22,8 +22,6 @@ # Temple Place, Suite 330, Boston, MA 02111-1307 USA # ############################################################################### -import logging - class MigrateBibles(): def __init__(self, display): self.display = display diff --git a/openlp/migration/migratesongs.py b/openlp/migration/migratesongs.py index 9f52c9fdc..e1b13b2c6 100644 --- a/openlp/migration/migratesongs.py +++ b/openlp/migration/migratesongs.py @@ -24,17 +24,15 @@ import os import sys -import logging import sqlite3 -from openlp.core.lib import PluginConfig from sqlalchemy import * -from sqlalchemy.sql import select from sqlalchemy import create_engine -from sqlalchemy.orm import scoped_session, sessionmaker, mapper, relation, \ - clear_mappers -from openlp.plugins.songs.lib.models import metadata, session, \ - engine, songs_table, Song, Author, Topic, Book +from sqlalchemy.orm import scoped_session, sessionmaker, mapper, relation + +from openlp.core.lib import PluginConfig +from openlp.plugins.songs.lib.models import metadata, songs_table, Song, \ + Author, Topic, Book from openlp.plugins.songs.lib.tables import * from openlp.plugins.songs.lib.classes import * diff --git a/openlp/plugins/audit/lib/audittab.py b/openlp/plugins/audit/lib/audittab.py index afdc04c64..25219f5c7 100644 --- a/openlp/plugins/audit/lib/audittab.py +++ b/openlp/plugins/audit/lib/audittab.py @@ -22,9 +22,9 @@ # Temple Place, Suite 330, Boston, MA 02111-1307 USA # ############################################################################### -from PyQt4 import QtCore, QtGui +from PyQt4 import QtGui -from openlp.core.lib import SettingsTab, str_to_bool, translate, Receiver +from openlp.core.lib import SettingsTab, translate, Receiver class AuditTab(SettingsTab): """ diff --git a/openlp/plugins/audit/lib/manager.py b/openlp/plugins/audit/lib/manager.py index 12d663bf8..fa4b8e219 100644 --- a/openlp/plugins/audit/lib/manager.py +++ b/openlp/plugins/audit/lib/manager.py @@ -22,15 +22,10 @@ # Temple Place, Suite 330, Boston, MA 02111-1307 USA # ############################################################################### -import os, os.path -import sys - -from sqlalchemy import asc, desc -from openlp.plugins.audit.lib.models import init_models, metadata, session, \ - engine, AuditItem, audit_table - import logging +from openlp.plugins.audit.lib.models import init_models, metadata, AuditItem + class AuditManager(): """ The Song Manager provides a central location for all database code. This diff --git a/openlp/plugins/audit/lib/meta.py b/openlp/plugins/audit/lib/meta.py index e0725f724..45d7e2568 100644 --- a/openlp/plugins/audit/lib/meta.py +++ b/openlp/plugins/audit/lib/meta.py @@ -24,7 +24,6 @@ from sqlalchemy import MetaData -from sqlalchemy.orm import scoped_session, sessionmaker __all__ = ['session', 'metadata', 'engine'] diff --git a/openlp/plugins/audit/lib/models.py b/openlp/plugins/audit/lib/models.py index f51ee8b25..9ae901537 100644 --- a/openlp/plugins/audit/lib/models.py +++ b/openlp/plugins/audit/lib/models.py @@ -23,9 +23,9 @@ ############################################################################### from sqlalchemy import create_engine -from sqlalchemy.orm import scoped_session, sessionmaker, mapper, relation +from sqlalchemy.orm import scoped_session, sessionmaker, mapper -from openlp.plugins.audit.lib.meta import session, metadata, engine +from openlp.plugins.audit.lib.meta import metadata from openlp.plugins.audit.lib.tables import * from openlp.plugins.audit.lib.classes import * diff --git a/openlp/plugins/audit/lib/tables.py b/openlp/plugins/audit/lib/tables.py index d4543ff79..24b787b21 100644 --- a/openlp/plugins/audit/lib/tables.py +++ b/openlp/plugins/audit/lib/tables.py @@ -22,7 +22,7 @@ # Temple Place, Suite 330, Boston, MA 02111-1307 USA # ############################################################################### -from sqlalchemy import Column, Table, ForeignKey, types +from sqlalchemy import Column, Table, types from openlp.plugins.audit.lib.meta import metadata diff --git a/openlp/plugins/bibles/forms/bibleimportform.py b/openlp/plugins/bibles/forms/bibleimportform.py index cddc8abd5..d077ea489 100644 --- a/openlp/plugins/bibles/forms/bibleimportform.py +++ b/openlp/plugins/bibles/forms/bibleimportform.py @@ -22,11 +22,8 @@ # Temple Place, Suite 330, Boston, MA 02111-1307 USA # ############################################################################### -import sys -import os, os.path -import sys -import time import logging +import os, os.path from PyQt4 import QtCore, QtGui diff --git a/openlp/plugins/bibles/lib/bibleCSVimpl.py b/openlp/plugins/bibles/lib/bibleCSVimpl.py index 1df41a551..1127f9e7e 100644 --- a/openlp/plugins/bibles/lib/bibleCSVimpl.py +++ b/openlp/plugins/bibles/lib/bibleCSVimpl.py @@ -25,11 +25,9 @@ import logging import chardet -from openlp.plugins.bibles.lib.bibleDBimpl import BibleDBImpl from openlp.plugins.bibles.lib.common import BibleCommon from openlp.core.lib import Receiver - class BibleCSVImpl(BibleCommon): global log log=logging.getLogger(u'BibleCSVImpl') diff --git a/openlp/plugins/bibles/lib/bibleDBimpl.py b/openlp/plugins/bibles/lib/bibleDBimpl.py index 79d20859f..fb068dad6 100644 --- a/openlp/plugins/bibles/lib/bibleDBimpl.py +++ b/openlp/plugins/bibles/lib/bibleDBimpl.py @@ -26,7 +26,6 @@ import os import logging from common import BibleCommon -from openlp.core.utils import ConfigHelper from openlp.plugins.bibles.lib.models import * class BibleDBImpl(BibleCommon): diff --git a/openlp/plugins/bibles/lib/bibleHTTPimpl.py b/openlp/plugins/bibles/lib/bibleHTTPimpl.py index 2176964ce..3c2effdbe 100644 --- a/openlp/plugins/bibles/lib/bibleHTTPimpl.py +++ b/openlp/plugins/bibles/lib/bibleHTTPimpl.py @@ -22,14 +22,10 @@ # Temple Place, Suite 330, Boston, MA 02111-1307 USA # ############################################################################### -import os, os.path -import sys -import urllib2 +import logging from common import BibleCommon, SearchResults -import logging - class BGExtract(BibleCommon): global log log=logging.getLogger(u'BibleHTTPMgr(BG_extract)') diff --git a/openlp/plugins/bibles/lib/bibleOSISimpl.py b/openlp/plugins/bibles/lib/bibleOSISimpl.py index 550c86e6b..8bcf0d856 100644 --- a/openlp/plugins/bibles/lib/bibleOSISimpl.py +++ b/openlp/plugins/bibles/lib/bibleOSISimpl.py @@ -30,7 +30,6 @@ import codecs from PyQt4 import QtCore -from openlp.plugins.bibles.lib.bibleDBimpl import BibleDBImpl from openlp.core.lib import Receiver class BibleOSISImpl(): diff --git a/openlp/plugins/bibles/lib/biblestab.py b/openlp/plugins/bibles/lib/biblestab.py index 288048301..6003d6d43 100644 --- a/openlp/plugins/bibles/lib/biblestab.py +++ b/openlp/plugins/bibles/lib/biblestab.py @@ -24,7 +24,7 @@ import logging -from PyQt4 import Qt, QtCore, QtGui +from PyQt4 import QtCore, QtGui from openlp.core.lib import translate, str_to_bool, Receiver from openlp.core.lib import SettingsTab diff --git a/openlp/plugins/bibles/lib/common.py b/openlp/plugins/bibles/lib/common.py index 3f1803ca3..22d222521 100644 --- a/openlp/plugins/bibles/lib/common.py +++ b/openlp/plugins/bibles/lib/common.py @@ -22,9 +22,6 @@ # Temple Place, Suite 330, Boston, MA 02111-1307 USA # ############################################################################### -import os -import os.path -import sys import urllib2 import chardet import logging diff --git a/openlp/plugins/bibles/lib/manager.py b/openlp/plugins/bibles/lib/manager.py index 62d3ff2e3..613dd05e4 100644 --- a/openlp/plugins/bibles/lib/manager.py +++ b/openlp/plugins/bibles/lib/manager.py @@ -24,14 +24,11 @@ import logging import os -import sys -from common import SearchResults from bibleOSISimpl import BibleOSISImpl from bibleCSVimpl import BibleCSVImpl from bibleDBimpl import BibleDBImpl from bibleHTTPimpl import BibleHTTPImpl -from openlp.core.lib import Receiver class BibleMode(object): Full = 1 diff --git a/openlp/plugins/bibles/lib/mediaitem.py b/openlp/plugins/bibles/lib/mediaitem.py index 4d1bfd9a9..37c01145a 100644 --- a/openlp/plugins/bibles/lib/mediaitem.py +++ b/openlp/plugins/bibles/lib/mediaitem.py @@ -27,8 +27,8 @@ import time from PyQt4 import QtCore, QtGui -from openlp.core.lib import translate, ServiceItem, MediaManagerItem, \ - Receiver, contextMenuAction, contextMenuSeparator, BaseListWithDnD +from openlp.core.lib import translate, MediaManagerItem, Receiver, \ + contextMenuAction, BaseListWithDnD from openlp.plugins.bibles.forms import BibleImportForm from openlp.plugins.bibles.lib.manager import BibleMode diff --git a/openlp/plugins/bibles/lib/models.py b/openlp/plugins/bibles/lib/models.py index d527ba72d..a6d5624b1 100644 --- a/openlp/plugins/bibles/lib/models.py +++ b/openlp/plugins/bibles/lib/models.py @@ -19,7 +19,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA """ -import string from sqlalchemy import Column, Table, MetaData, ForeignKey, types, \ create_engine diff --git a/openlp/plugins/bibles/test/test_bibleManager.py b/openlp/plugins/bibles/test/test_bibleManager.py index 819b07608..272448b0b 100644 --- a/openlp/plugins/bibles/test/test_bibleManager.py +++ b/openlp/plugins/bibles/test/test_bibleManager.py @@ -16,36 +16,33 @@ this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA """ -import random -import unittest - +import logging import os, os.path import sys -mypath=os.path.split(os.path.abspath(__file__))[0] -sys.path.insert(0,(os.path.join(mypath, '..', '..','..','..'))) from openlp.plugins.bibles.lib.biblemanager import BibleManager -from openlp.utils import ConfigHelper -import logging +mypath = os.path.split(os.path.abspath(__file__))[0] +sys.path.insert(0,(os.path.join(mypath, '..', '..','..','..'))) + logging.basicConfig(level=logging.DEBUG, format='%(asctime)s %(name)-12s %(levelname)-8s %(message)s', datefmt='%m-%d %H:%M', filename='plugins.log', filemode='w') -console=logging.StreamHandler() +console = logging.StreamHandler() # set a format which is simpler for console use formatter = logging.Formatter(u'%(name)-12s: %(levelname)-8s %(message)s') # tell the handler to use this format console.setFormatter(formatter) logging.getLogger(u'').addHandler(console) -log=logging.getLogger(u'') +log = logging.getLogger(u'') logging.info(u'\nLogging started') class TestBibleManager: - log=logging.getLogger(u'testBibleMgr') + log = logging.getLogger(u'testBibleMgr') def setup_class(self): log.debug(u'\n.......Register BM') self.bm = BibleManager() diff --git a/openlp/plugins/bibles/test/test_bibleManagerAPI.py b/openlp/plugins/bibles/test/test_bibleManagerAPI.py index a6ef6a545..2544b32b3 100644 --- a/openlp/plugins/bibles/test/test_bibleManagerAPI.py +++ b/openlp/plugins/bibles/test/test_bibleManagerAPI.py @@ -16,36 +16,33 @@ this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA """ -import random -import unittest - +import logging import os, os.path import sys -mypath=os.path.split(os.path.abspath(__file__))[0] -sys.path.insert(0,(os.path.join(mypath, '..', '..','..','..'))) from openlp.plugins.biblemanager.bibleManager import BibleManager -from openlp.core.utils import ConfigHelper -import logging +mypath = os.path.split(os.path.abspath(__file__))[0] +sys.path.insert(0,(os.path.join(mypath, '..', '..','..','..'))) + logging.basicConfig(level=logging.DEBUG, format='%(asctime)s %(name)-12s %(levelname)-8s %(message)s', datefmt='%m-%d %H:%M', filename='plugins.log', filemode='w') -console=logging.StreamHandler() +console = logging.StreamHandler() # set a format which is simpler for console use formatter = logging.Formatter(u'%(name)-12s: %(levelname)-8s %(message)s') # tell the handler to use this format console.setFormatter(formatter) logging.getLogger(u'').addHandler(console) -log=logging.getLogger(u'') +log = logging.getLogger(u'') logging.info(u'\nLogging started') class TestBibleManager: - log=logging.getLogger(u'testBibleMgr') + log = logging.getLogger(u'testBibleMgr') def setup_class(self): log.debug(u'\n.......Register BM') self.bm = BibleManager() diff --git a/openlp/plugins/bibles/test/test_bibleManagerCSV.py b/openlp/plugins/bibles/test/test_bibleManagerCSV.py index e6cf53b58..9d0370785 100644 --- a/openlp/plugins/bibles/test/test_bibleManagerCSV.py +++ b/openlp/plugins/bibles/test/test_bibleManagerCSV.py @@ -16,36 +16,33 @@ this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA """ -import random -import unittest - +import logging import os, os.path import sys -mypath=os.path.split(os.path.abspath(__file__))[0] -sys.path.insert(0,(os.path.join(mypath, '..', '..','..','..'))) from openlp.plugins.bibles.lib.biblemanager import BibleManager -from openlp.utils import ConfigHelper -import logging +mypath = os.path.split(os.path.abspath(__file__))[0] +sys.path.insert(0,(os.path.join(mypath, '..', '..','..','..'))) + logging.basicConfig(level=logging.DEBUG, format='%(asctime)s %(name)-12s %(levelname)-8s %(message)s', datefmt='%m-%d %H:%M', filename='plugins.log', filemode='w') -console=logging.StreamHandler() +console = logging.StreamHandler() # set a format which is simpler for console use formatter = logging.Formatter(u'%(name)-12s: %(levelname)-8s %(message)s') # tell the handler to use this format console.setFormatter(formatter) logging.getLogger(u'').addHandler(console) -log=logging.getLogger(u'') +log = logging.getLogger(u'') logging.info(u'\nLogging started') class TestBibleManager: - log=logging.getLogger(u'testBibleMgr') + log = logging.getLogger(u'testBibleMgr') def setup_class(self): log.debug(u'\n.......Register BM') self.bm = BibleManager() diff --git a/openlp/plugins/bibles/test/test_bibleManagerOSIS.py b/openlp/plugins/bibles/test/test_bibleManagerOSIS.py index ed8cf035d..1a22e5803 100644 --- a/openlp/plugins/bibles/test/test_bibleManagerOSIS.py +++ b/openlp/plugins/bibles/test/test_bibleManagerOSIS.py @@ -16,36 +16,33 @@ this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA """ -import random -import unittest - +import logging import os, os.path import sys -mypath=os.path.split(os.path.abspath(__file__))[0] -sys.path.insert(0,(os.path.join(mypath, '..', '..','..','..'))) from openlp.plugins.bibles.lib.biblemanager import BibleManager -from openlp.utils import ConfigHelper -import logging +mypath = os.path.split(os.path.abspath(__file__))[0] +sys.path.insert(0,(os.path.join(mypath, '..', '..','..','..'))) + logging.basicConfig(level=logging.DEBUG, format='%(asctime)s %(name)-12s %(levelname)-8s %(message)s', datefmt='%m-%d %H:%M', filename='plugins.log', filemode='w') -console=logging.StreamHandler() +console = logging.StreamHandler() # set a format which is simpler for console use formatter = logging.Formatter(u'%(name)-12s: %(levelname)-8s %(message)s') # tell the handler to use this format console.setFormatter(formatter) logging.getLogger(u'').addHandler(console) -log=logging.getLogger(u'') +log = logging.getLogger(u'') logging.info(u'\nLogging started') class TestBibleManager: - log=logging.getLogger(u'testBibleMgr') + log = logging.getLogger(u'testBibleMgr') def setup_class(self): log.debug(u'\n.......Register BM') self.bm = BibleManager() diff --git a/openlp/plugins/custom/customplugin.py b/openlp/plugins/custom/customplugin.py index 999dccf93..ec3325ede 100644 --- a/openlp/plugins/custom/customplugin.py +++ b/openlp/plugins/custom/customplugin.py @@ -24,7 +24,7 @@ import logging -from PyQt4 import QtCore, QtGui +from PyQt4 import QtGui from forms import EditCustomForm from openlp.core.lib import Plugin diff --git a/openlp/plugins/custom/forms/editcustomform.py b/openlp/plugins/custom/forms/editcustomform.py index 6ead917e2..d701132e7 100644 --- a/openlp/plugins/custom/forms/editcustomform.py +++ b/openlp/plugins/custom/forms/editcustomform.py @@ -22,7 +22,7 @@ # Temple Place, Suite 330, Boston, MA 02111-1307 USA # ############################################################################### -from PyQt4 import Qt, QtCore, QtGui +from PyQt4 import QtCore, QtGui from editcustomdialog import Ui_customEditDialog from openlp.core.lib import SongXMLBuilder, SongXMLParser, Receiver, translate diff --git a/openlp/plugins/custom/lib/manager.py b/openlp/plugins/custom/lib/manager.py index 4f5406102..3135f205a 100644 --- a/openlp/plugins/custom/lib/manager.py +++ b/openlp/plugins/custom/lib/manager.py @@ -22,15 +22,10 @@ # Temple Place, Suite 330, Boston, MA 02111-1307 USA # ############################################################################### -import os, os.path -import sys - -from sqlalchemy import asc, desc -from openlp.plugins.custom.lib.models import init_models, metadata, session, \ - engine, CustomSlide, custom_slide_table - import logging +from openlp.plugins.custom.lib.models import init_models, metadata, CustomSlide + class CustomManager(): """ The Song Manager provides a central location for all database code. This @@ -38,7 +33,7 @@ class CustomManager(): """ global log - log=logging.getLogger(u'CustomManager') + log = logging.getLogger(u'CustomManager') log.info(u'Custom manager loaded') def __init__(self, config): diff --git a/openlp/plugins/custom/lib/mediaitem.py b/openlp/plugins/custom/lib/mediaitem.py index d2614435d..4bda0d36d 100644 --- a/openlp/plugins/custom/lib/mediaitem.py +++ b/openlp/plugins/custom/lib/mediaitem.py @@ -26,8 +26,7 @@ import logging from PyQt4 import QtCore, QtGui -from openlp.core.lib import MediaManagerItem, SongXMLParser, ServiceItem, \ - translate, contextMenuAction, contextMenuSeparator, BaseListWithDnD +from openlp.core.lib import MediaManagerItem, SongXMLParser, BaseListWithDnD class CustomListView(BaseListWithDnD): def __init__(self, parent=None): diff --git a/openlp/plugins/custom/lib/meta.py b/openlp/plugins/custom/lib/meta.py index c8c602c97..6655f4d83 100644 --- a/openlp/plugins/custom/lib/meta.py +++ b/openlp/plugins/custom/lib/meta.py @@ -23,7 +23,6 @@ ############################################################################### from sqlalchemy import MetaData -from sqlalchemy.orm import scoped_session, sessionmaker __all__ = ['session', 'metadata', 'engine'] diff --git a/openlp/plugins/custom/lib/models.py b/openlp/plugins/custom/lib/models.py index 82c4507be..9e82ec8cd 100644 --- a/openlp/plugins/custom/lib/models.py +++ b/openlp/plugins/custom/lib/models.py @@ -23,9 +23,9 @@ ############################################################################### from sqlalchemy import create_engine -from sqlalchemy.orm import scoped_session, sessionmaker, mapper, relation +from sqlalchemy.orm import scoped_session, sessionmaker, mapper -from openlp.plugins.custom.lib.meta import session, metadata, engine +from openlp.plugins.custom.lib.meta import metadata from openlp.plugins.custom.lib.tables import * from openlp.plugins.custom.lib.classes import * diff --git a/openlp/plugins/custom/lib/tables.py b/openlp/plugins/custom/lib/tables.py index dd9a95fc5..57a964da0 100644 --- a/openlp/plugins/custom/lib/tables.py +++ b/openlp/plugins/custom/lib/tables.py @@ -22,7 +22,7 @@ # Temple Place, Suite 330, Boston, MA 02111-1307 USA # ############################################################################### -from sqlalchemy import Column, Table, ForeignKey, types +from sqlalchemy import Column, Table, types from openlp.plugins.custom.lib.meta import metadata diff --git a/openlp/plugins/images/imageplugin.py b/openlp/plugins/images/imageplugin.py index a51470df7..5f876baf6 100644 --- a/openlp/plugins/images/imageplugin.py +++ b/openlp/plugins/images/imageplugin.py @@ -24,7 +24,7 @@ import logging -from PyQt4 import QtCore, QtGui +from PyQt4 import QtGui from openlp.core.lib import Plugin from openlp.plugins.images.lib import ImageMediaItem, ImageTab diff --git a/openlp/plugins/images/lib/imagetab.py b/openlp/plugins/images/lib/imagetab.py index 99c7dfd34..ccf6d7571 100644 --- a/openlp/plugins/images/lib/imagetab.py +++ b/openlp/plugins/images/lib/imagetab.py @@ -24,7 +24,7 @@ from PyQt4 import QtCore, QtGui -from openlp.core.lib import SettingsTab, str_to_bool, translate, Receiver +from openlp.core.lib import SettingsTab, translate, Receiver class ImageTab(SettingsTab): """ diff --git a/openlp/plugins/images/lib/mediaitem.py b/openlp/plugins/images/lib/mediaitem.py index 79efa7389..f46c91869 100644 --- a/openlp/plugins/images/lib/mediaitem.py +++ b/openlp/plugins/images/lib/mediaitem.py @@ -26,8 +26,7 @@ import logging import os from PyQt4 import QtCore, QtGui -from openlp.core.lib import MediaManagerItem, ServiceItem, translate, \ - BaseListWithDnD, buildIcon +from openlp.core.lib import MediaManagerItem, BaseListWithDnD, buildIcon # We have to explicitly create separate classes for each plugin # in order for DnD to the Service manager to work correctly. diff --git a/openlp/plugins/media/lib/mediaitem.py b/openlp/plugins/media/lib/mediaitem.py index 29d221859..01a81fa88 100644 --- a/openlp/plugins/media/lib/mediaitem.py +++ b/openlp/plugins/media/lib/mediaitem.py @@ -24,14 +24,10 @@ import logging import os -import tempfile from PyQt4 import QtCore, QtGui -from openlp.core.lib import MediaManagerItem, ServiceItem, translate, \ - BaseListWithDnD, buildIcon - -from openlp.plugins.media.lib import MediaTab, FileListData +from openlp.core.lib import MediaManagerItem, BaseListWithDnD, buildIcon class MediaListView(BaseListWithDnD): def __init__(self, parent=None): diff --git a/openlp/plugins/media/mediaplugin.py b/openlp/plugins/media/mediaplugin.py index db194e649..1f589d7f5 100644 --- a/openlp/plugins/media/mediaplugin.py +++ b/openlp/plugins/media/mediaplugin.py @@ -22,10 +22,9 @@ # Temple Place, Suite 330, Boston, MA 02111-1307 USA # ############################################################################### -import os -from PyQt4 import QtCore, QtGui +from PyQt4 import QtGui -from openlp.core.lib import Plugin, MediaManagerItem, SettingsTab +from openlp.core.lib import Plugin, from openlp.plugins.media.lib import MediaTab,MediaMediaItem class MediaPlugin(Plugin): diff --git a/openlp/plugins/presentations/lib/impresscontroller.py b/openlp/plugins/presentations/lib/impresscontroller.py index be6b0b213..763afd1d2 100644 --- a/openlp/plugins/presentations/lib/impresscontroller.py +++ b/openlp/plugins/presentations/lib/impresscontroller.py @@ -27,16 +27,13 @@ Place, Suite 330, Boston, MA 02111-1307 USA # http://nxsy.org/comparing-documents-with-openoffice-and-python import logging -import os, subprocess -import time -import sys +import os if os.name == u'nt': from win32com.client import Dispatch else: import uno - from PyQt4 import QtCore class ImpressController(object): diff --git a/openlp/plugins/presentations/lib/mediaitem.py b/openlp/plugins/presentations/lib/mediaitem.py index 37f1569d4..ea92535e3 100644 --- a/openlp/plugins/presentations/lib/mediaitem.py +++ b/openlp/plugins/presentations/lib/mediaitem.py @@ -26,8 +26,8 @@ import logging import os from PyQt4 import QtCore, QtGui -from openlp.core.lib import MediaManagerItem, ServiceItem, translate, \ - BaseListWithDnD + +from openlp.core.lib import MediaManagerItem, translate, BaseListWithDnD from openlp.plugins.presentations.lib import MessageListener # We have to explicitly create separate classes for each plugin diff --git a/openlp/plugins/presentations/lib/messagelistener.py b/openlp/plugins/presentations/lib/messagelistener.py index db291ee5f..586a371f7 100644 --- a/openlp/plugins/presentations/lib/messagelistener.py +++ b/openlp/plugins/presentations/lib/messagelistener.py @@ -21,8 +21,8 @@ import logging import os from PyQt4 import QtCore + from openlp.core.lib import Receiver -from openlp.plugins.presentations.lib import ImpressController class MessageListener(object): """ diff --git a/openlp/plugins/presentations/lib/pptviewcontroller.py b/openlp/plugins/presentations/lib/pptviewcontroller.py index a772c62cd..149c3fb37 100644 --- a/openlp/plugins/presentations/lib/pptviewcontroller.py +++ b/openlp/plugins/presentations/lib/pptviewcontroller.py @@ -23,15 +23,10 @@ ############################################################################### import logging -import os, subprocess -import time -import sys -import win32api + from ctypes import * from ctypes.wintypes import RECT -from PyQt4 import QtCore - class PptviewController(object): """ Class to control interactions with PowerPOint Viewer Presentations diff --git a/openlp/plugins/presentations/lib/presentationtab.py b/openlp/plugins/presentations/lib/presentationtab.py index cd0317c6b..a61b76e2a 100644 --- a/openlp/plugins/presentations/lib/presentationtab.py +++ b/openlp/plugins/presentations/lib/presentationtab.py @@ -22,9 +22,9 @@ # Temple Place, Suite 330, Boston, MA 02111-1307 USA # ############################################################################### -from PyQt4 import Qt, QtCore, QtGui +from PyQt4 import QtGui -from openlp.core.lib import SettingsTab, translate, str_to_bool +from openlp.core.lib import SettingsTab, translate class PresentationTab(SettingsTab): """ diff --git a/openlp/plugins/presentations/presentationplugin.py b/openlp/plugins/presentations/presentationplugin.py index 96947cc66..1e098b597 100644 --- a/openlp/plugins/presentations/presentationplugin.py +++ b/openlp/plugins/presentations/presentationplugin.py @@ -23,12 +23,11 @@ ############################################################################### import os -import sys import logging from PyQt4 import QtCore, QtGui -from openlp.core.lib import Plugin, MediaManagerItem +from openlp.core.lib import Plugin from openlp.plugins.presentations.lib import PresentationMediaItem, \ PresentationTab, ImpressController if os.name == u'nt': @@ -38,7 +37,6 @@ if os.name == u'nt': pass from openlp.plugins.presentations.lib import PptviewController - class PresentationPlugin(Plugin): global log diff --git a/openlp/plugins/remotes/lib/remotetab.py b/openlp/plugins/remotes/lib/remotetab.py index 72adc8302..a51a6d9ec 100644 --- a/openlp/plugins/remotes/lib/remotetab.py +++ b/openlp/plugins/remotes/lib/remotetab.py @@ -18,9 +18,9 @@ this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA """ -from PyQt4 import QtCore, QtGui +from PyQt4 import QtGui -from openlp.core.lib import SettingsTab, str_to_bool, translate +from openlp.core.lib import SettingsTab, translate class RemoteTab(SettingsTab): """ diff --git a/openlp/plugins/remotes/remoteplugin.py b/openlp/plugins/remotes/remoteplugin.py index 77262de4e..09d9082cb 100644 --- a/openlp/plugins/remotes/remoteplugin.py +++ b/openlp/plugins/remotes/remoteplugin.py @@ -18,9 +18,8 @@ this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA """ import logging -import sys -from PyQt4 import QtNetwork, QtGui, QtCore +from PyQt4 import QtNetwork, QtCore from openlp.core.lib import Plugin, Receiver from openlp.plugins.remotes.lib import RemoteTab diff --git a/openlp/plugins/songs/forms/editsongform.py b/openlp/plugins/songs/forms/editsongform.py index 2e2c74312..350436b82 100644 --- a/openlp/plugins/songs/forms/editsongform.py +++ b/openlp/plugins/songs/forms/editsongform.py @@ -24,10 +24,9 @@ import logging -from PyQt4 import Qt, QtCore, QtGui +from PyQt4 import QtCore, QtGui -from openlp.core.lib import SongXMLBuilder, SongXMLParser, Receiver, \ - translate +from openlp.core.lib import SongXMLBuilder, SongXMLParser, Receiver, translate from openlp.plugins.songs.forms import EditVerseForm from openlp.plugins.songs.lib.models import Song from editsongdialog import Ui_EditSongDialog diff --git a/openlp/plugins/songs/forms/editverseform.py b/openlp/plugins/songs/forms/editverseform.py index 1c3814869..93f5040d9 100644 --- a/openlp/plugins/songs/forms/editverseform.py +++ b/openlp/plugins/songs/forms/editverseform.py @@ -22,7 +22,7 @@ # Temple Place, Suite 330, Boston, MA 02111-1307 USA # ############################################################################### -from PyQt4 import Qt, QtCore, QtGui +from PyQt4 import QtCore, QtGui from editversedialog import Ui_EditVerseDialog diff --git a/openlp/plugins/songs/forms/songbookform.py b/openlp/plugins/songs/forms/songbookform.py index 4822fb896..bcc72d65a 100644 --- a/openlp/plugins/songs/forms/songbookform.py +++ b/openlp/plugins/songs/forms/songbookform.py @@ -22,7 +22,8 @@ # Temple Place, Suite 330, Boston, MA 02111-1307 USA # ############################################################################### -from PyQt4 import QtGui, QtCore +from PyQt4 import QtGui + from openlp.core.lib import translate from openlp.plugins.songs.forms.songbookdialog import Ui_SongBookDialog diff --git a/openlp/plugins/songs/forms/topicsform.py b/openlp/plugins/songs/forms/topicsform.py index e3daf07bd..6598219bf 100644 --- a/openlp/plugins/songs/forms/topicsform.py +++ b/openlp/plugins/songs/forms/topicsform.py @@ -22,7 +22,8 @@ # Temple Place, Suite 330, Boston, MA 02111-1307 USA # ############################################################################### -from PyQt4 import QtGui, QtCore +from PyQt4 import QtGui + from openlp.core.lib import translate from openlp.plugins.songs.forms.topicsdialog import Ui_TopicsDialog diff --git a/openlp/plugins/songs/lib/manager.py b/openlp/plugins/songs/lib/manager.py index f0ede9e0b..5f540ea39 100644 --- a/openlp/plugins/songs/lib/manager.py +++ b/openlp/plugins/songs/lib/manager.py @@ -22,15 +22,11 @@ # Temple Place, Suite 330, Boston, MA 02111-1307 USA # ############################################################################### -import os, os.path -import sys - -from sqlalchemy import asc, desc -from openlp.plugins.songs.lib.models import init_models, metadata, session, \ - engine, songs_table, Song, Author, Topic, Book - import logging +from openlp.plugins.songs.lib.models import init_models, metadata, Song, \ + Author, Topic, Book + class SongManager(): """ The Song Manager provides a central location for all database code. This diff --git a/openlp/plugins/songs/lib/mediaitem.py b/openlp/plugins/songs/lib/mediaitem.py index c11ac2451..6f423cdd9 100644 --- a/openlp/plugins/songs/lib/mediaitem.py +++ b/openlp/plugins/songs/lib/mediaitem.py @@ -26,9 +26,8 @@ import logging from PyQt4 import QtCore, QtGui -from openlp.core.lib import MediaManagerItem, translate, ServiceItem, \ - SongXMLParser, contextMenuAction, contextMenuSeparator, BaseListWithDnD, \ - Receiver +from openlp.core.lib import MediaManagerItem, translate, SongXMLParser, \ + contextMenuAction, contextMenuSeparator, BaseListWithDnD, Receiver from openlp.plugins.songs.forms import EditSongForm, SongMaintenanceForm class SongListView(BaseListWithDnD): diff --git a/openlp/plugins/songs/lib/meta.py b/openlp/plugins/songs/lib/meta.py index c8c602c97..6655f4d83 100644 --- a/openlp/plugins/songs/lib/meta.py +++ b/openlp/plugins/songs/lib/meta.py @@ -23,7 +23,6 @@ ############################################################################### from sqlalchemy import MetaData -from sqlalchemy.orm import scoped_session, sessionmaker __all__ = ['session', 'metadata', 'engine'] diff --git a/openlp/plugins/songs/lib/models.py b/openlp/plugins/songs/lib/models.py index 350a09751..0d7bd480d 100644 --- a/openlp/plugins/songs/lib/models.py +++ b/openlp/plugins/songs/lib/models.py @@ -25,7 +25,7 @@ from sqlalchemy import create_engine from sqlalchemy.orm import scoped_session, sessionmaker, mapper, relation -from openlp.plugins.songs.lib.meta import session, metadata, engine +from openlp.plugins.songs.lib.meta import metadata from openlp.plugins.songs.lib.tables import * from openlp.plugins.songs.lib.classes import * diff --git a/openlp/plugins/songs/lib/songstab.py b/openlp/plugins/songs/lib/songstab.py index 6b61469a0..93d40ba49 100644 --- a/openlp/plugins/songs/lib/songstab.py +++ b/openlp/plugins/songs/lib/songstab.py @@ -22,8 +22,6 @@ # Temple Place, Suite 330, Boston, MA 02111-1307 USA # ############################################################################### -from PyQt4 import QtCore, QtGui - from openlp.core.lib import SettingsTab, translate class SongsTab(SettingsTab): diff --git a/openlp/plugins/songs/songsplugin.py b/openlp/plugins/songs/songsplugin.py index 896a1235c..22e24d93f 100644 --- a/openlp/plugins/songs/songsplugin.py +++ b/openlp/plugins/songs/songsplugin.py @@ -27,7 +27,7 @@ import logging from PyQt4 import QtCore, QtGui from openlp.core.lib import Plugin, translate -from openlp.plugins.songs.lib import SongManager, SongsTab, SongMediaItem +from openlp.plugins.songs.lib import SongManager, SongMediaItem from openlp.plugins.songs.forms import OpenLPImportForm, OpenSongExportForm, \ OpenSongImportForm, OpenLPExportForm diff --git a/openlp/plugins/songs/test/test_song_verse.py b/openlp/plugins/songs/test/test_song_verse.py index a37d17c96..0eb235076 100644 --- a/openlp/plugins/songs/test/test_song_verse.py +++ b/openlp/plugins/songs/test/test_song_verse.py @@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA """ -import py.test + import os import sys diff --git a/openlpcnv.pyw b/openlpcnv.pyw index 8f0750df3..98e391f81 100755 --- a/openlpcnv.pyw +++ b/openlpcnv.pyw @@ -24,10 +24,8 @@ ############################################################################### import os -import sys import logging import time -import datetime from openlp.migration.display import * from openlp.migration.migratefiles import *