← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~tomasgroth/openlp/pylint-fixes into lp:openlp

 

Tomas Groth has proposed merging lp:~tomasgroth/openlp/pylint-fixes into lp:openlp.

Commit message:
Fix errors detected by pylint. Among them a fix for traceback when adding an item to the servicemanager.

Requested reviews:
  Tim Bentley (trb143)

For more details, see:
https://code.launchpad.net/~tomasgroth/openlp/pylint-fixes/+merge/365986
-- 
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/core/lib/mediamanageritem.py'
--- openlp/core/lib/mediamanageritem.py	2019-03-17 10:36:12 +0000
+++ openlp/core/lib/mediamanageritem.py	2019-04-13 08:25:08 +0000
@@ -595,7 +595,7 @@
         :param remote: Triggered from remote
         :param position: Position to place item
         """
-        service_item = self.build_service_item(item, True, remote=remote, context=ServiceItemContext.Service)
+        service_item = self.build_service_item(item, remote=remote, context=ServiceItemContext.Service)
         if service_item:
             service_item.from_plugin = False
             self.service_manager.add_service_item(service_item, replace=replace, position=position)

=== modified file 'openlp/core/ui/printserviceform.py'
--- openlp/core/ui/printserviceform.py	2019-02-21 21:26:36 +0000
+++ openlp/core/ui/printserviceform.py	2019-04-13 08:25:08 +0000
@@ -239,7 +239,7 @@
             footer_html = footer_html.partition('<br>')[2]
             if footer_html:
                 footer_html = html.escape(footer_html.replace('<br>', '\n'))
-                self._add_element('div', footer_html.replace('\n', '<br>'), parent=div, classId='itemFooter')
+                self._add_element('div', footer_html.replace('\n', '<br>'), parent=div, class_id='itemFooter')
         # Add service items' notes.
         if self.notes_check_box.isChecked():
             if item.notes:

=== modified file 'openlp/core/widgets/edits.py'
--- openlp/core/widgets/edits.py	2019-03-10 21:01:39 +0000
+++ openlp/core/widgets/edits.py	2019-04-13 08:25:08 +0000
@@ -352,7 +352,7 @@
         :rtype: None
         """
         if self._path != path:
-            self.path = path
+            self._path = path
             self.pathChanged.emit(path)
 
 

=== modified file 'openlp/plugins/bibles/lib/manager.py'
--- openlp/plugins/bibles/lib/manager.py	2019-03-16 21:07:44 +0000
+++ openlp/plugins/bibles/lib/manager.py	2019-04-13 08:25:08 +0000
@@ -187,7 +187,7 @@
         bible = self.db_cache[name]
         bible.session.close_all()
         bible.session = None
-        return delete_file(bible.path, bible.file_path)
+        return delete_file(bible.path / '{name}{suffix}'.format(name=name, suffix=self.suffix))
 
     def get_bibles(self):
         """

=== modified file 'tests/functional/openlp_plugins/bibles/test_manager.py'
--- tests/functional/openlp_plugins/bibles/test_manager.py	2019-03-17 10:01:52 +0000
+++ tests/functional/openlp_plugins/bibles/test_manager.py	2019-04-13 08:25:08 +0000
@@ -67,4 +67,4 @@
             assert result is True
             mocked_close_all.assert_called_once_with()
             assert mocked_bible.session is None
-            mocked_delete_file.assert_called_once_with(Path('bibles'), 'KJV.sqlite')
+            mocked_delete_file.assert_called_once_with(Path('bibles') / 'KJV.sqlite')


Follow ups