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

Proposed by Tomas Groth
Status: Merged
Merged at revision: 2858
Proposed branch: lp:~tomasgroth/openlp/pylint-fixes
Merge into: lp:openlp
Diff against target: 61 lines (+5/-5)
5 files modified
openlp/core/lib/mediamanageritem.py (+1/-1)
openlp/core/ui/printserviceform.py (+1/-1)
openlp/core/widgets/edits.py (+1/-1)
openlp/plugins/bibles/lib/manager.py (+1/-1)
tests/functional/openlp_plugins/bibles/test_manager.py (+1/-1)
To merge this branch: bzr merge lp:~tomasgroth/openlp/pylint-fixes
Reviewer Review Type Date Requested Status
Tim Bentley Approve
Review via email: mp+365986@code.launchpad.net

This proposal supersedes a proposal from 2019-04-12.

Commit message

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

To post a comment you must log in.
Revision history for this message
Raoul Snyman (raoul-snyman) wrote : Posted in a previous version of this proposal

Linux tests failed, please see https://ci.openlp.io/job/MP-02-Linux_Tests/124/ for more details

Revision history for this message
Tim Bentley (trb143) : Posted in a previous version of this proposal
review: Approve
Revision history for this message
Raoul Snyman (raoul-snyman) wrote :

Linux tests passed!

Revision history for this message
Raoul Snyman (raoul-snyman) wrote :

Linting passed!

Revision history for this message
Raoul Snyman (raoul-snyman) wrote :

macOS tests passed!

Revision history for this message
Tim Bentley (trb143) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== 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 @@
595 :param remote: Triggered from remote595 :param remote: Triggered from remote
596 :param position: Position to place item596 :param position: Position to place item
597 """597 """
598 service_item = self.build_service_item(item, True, remote=remote, context=ServiceItemContext.Service)598 service_item = self.build_service_item(item, remote=remote, context=ServiceItemContext.Service)
599 if service_item:599 if service_item:
600 service_item.from_plugin = False600 service_item.from_plugin = False
601 self.service_manager.add_service_item(service_item, replace=replace, position=position)601 self.service_manager.add_service_item(service_item, replace=replace, position=position)
602602
=== 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 @@
239 footer_html = footer_html.partition('<br>')[2]239 footer_html = footer_html.partition('<br>')[2]
240 if footer_html:240 if footer_html:
241 footer_html = html.escape(footer_html.replace('<br>', '\n'))241 footer_html = html.escape(footer_html.replace('<br>', '\n'))
242 self._add_element('div', footer_html.replace('\n', '<br>'), parent=div, classId='itemFooter')242 self._add_element('div', footer_html.replace('\n', '<br>'), parent=div, class_id='itemFooter')
243 # Add service items' notes.243 # Add service items' notes.
244 if self.notes_check_box.isChecked():244 if self.notes_check_box.isChecked():
245 if item.notes:245 if item.notes:
246246
=== 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 @@
352 :rtype: None352 :rtype: None
353 """353 """
354 if self._path != path:354 if self._path != path:
355 self.path = path355 self._path = path
356 self.pathChanged.emit(path)356 self.pathChanged.emit(path)
357357
358358
359359
=== 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 @@
187 bible = self.db_cache[name]187 bible = self.db_cache[name]
188 bible.session.close_all()188 bible.session.close_all()
189 bible.session = None189 bible.session = None
190 return delete_file(bible.path, bible.file_path)190 return delete_file(bible.path / '{name}{suffix}'.format(name=name, suffix=self.suffix))
191191
192 def get_bibles(self):192 def get_bibles(self):
193 """193 """
194194
=== 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 @@
67 assert result is True67 assert result is True
68 mocked_close_all.assert_called_once_with()68 mocked_close_all.assert_called_once_with()
69 assert mocked_bible.session is None69 assert mocked_bible.session is None
70 mocked_delete_file.assert_called_once_with(Path('bibles'), 'KJV.sqlite')70 mocked_delete_file.assert_called_once_with(Path('bibles') / 'KJV.sqlite')