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

Proposed by Tomas Groth
Status: Superseded
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+365979@code.launchpad.net

This proposal has been superseded by a proposal from 2019-04-13.

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 :

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) :
review: Approve
lp:~tomasgroth/openlp/pylint-fixes updated
2859. By Tomas Groth

Followup fix...

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'openlp/core/lib/mediamanageritem.py'
2--- openlp/core/lib/mediamanageritem.py 2019-03-17 10:36:12 +0000
3+++ openlp/core/lib/mediamanageritem.py 2019-04-13 08:24:44 +0000
4@@ -595,7 +595,7 @@
5 :param remote: Triggered from remote
6 :param position: Position to place item
7 """
8- service_item = self.build_service_item(item, True, remote=remote, context=ServiceItemContext.Service)
9+ service_item = self.build_service_item(item, remote=remote, context=ServiceItemContext.Service)
10 if service_item:
11 service_item.from_plugin = False
12 self.service_manager.add_service_item(service_item, replace=replace, position=position)
13
14=== modified file 'openlp/core/ui/printserviceform.py'
15--- openlp/core/ui/printserviceform.py 2019-02-21 21:26:36 +0000
16+++ openlp/core/ui/printserviceform.py 2019-04-13 08:24:44 +0000
17@@ -239,7 +239,7 @@
18 footer_html = footer_html.partition('<br>')[2]
19 if footer_html:
20 footer_html = html.escape(footer_html.replace('<br>', '\n'))
21- self._add_element('div', footer_html.replace('\n', '<br>'), parent=div, classId='itemFooter')
22+ self._add_element('div', footer_html.replace('\n', '<br>'), parent=div, class_id='itemFooter')
23 # Add service items' notes.
24 if self.notes_check_box.isChecked():
25 if item.notes:
26
27=== modified file 'openlp/core/widgets/edits.py'
28--- openlp/core/widgets/edits.py 2019-03-10 21:01:39 +0000
29+++ openlp/core/widgets/edits.py 2019-04-13 08:24:44 +0000
30@@ -352,7 +352,7 @@
31 :rtype: None
32 """
33 if self._path != path:
34- self.path = path
35+ self._path = path
36 self.pathChanged.emit(path)
37
38
39
40=== modified file 'openlp/plugins/bibles/lib/manager.py'
41--- openlp/plugins/bibles/lib/manager.py 2019-03-16 21:07:44 +0000
42+++ openlp/plugins/bibles/lib/manager.py 2019-04-13 08:24:44 +0000
43@@ -187,7 +187,7 @@
44 bible = self.db_cache[name]
45 bible.session.close_all()
46 bible.session = None
47- return delete_file(bible.path, bible.file_path)
48+ return delete_file(bible.path / '{name}{suffix}'.format(name=name, suffix=self.suffix))
49
50 def get_bibles(self):
51 """
52
53=== modified file 'tests/functional/openlp_plugins/bibles/test_manager.py'
54--- tests/functional/openlp_plugins/bibles/test_manager.py 2019-03-17 10:01:52 +0000
55+++ tests/functional/openlp_plugins/bibles/test_manager.py 2019-04-13 08:24:44 +0000
56@@ -67,4 +67,4 @@
57 assert result is True
58 mocked_close_all.assert_called_once_with()
59 assert mocked_bible.session is None
60- mocked_delete_file.assert_called_once_with(Path('bibles'), 'KJV.sqlite')
61+ mocked_delete_file.assert_called_once_with(Path('bibles') / 'KJV.sqlite')