~raoul-snyman/openlp/pep440

« back to all changes in this revision

Viewing changes to openlp/plugins/songs/lib/importers/opensong.py

  • Committer: Tomas Groth
  • Date: 2018-07-07 06:45:39 UTC
  • mfrom: (2821.1.7 pycodestyle)
  • Revision ID: tomasgroth@yahoo.dk-20180707064539-5q0enwn43pbjou3v
Fix pep8 and pylint errors detected by new version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
156
156
                ustring = str(root.__getattr__(attr))
157
157
                if isinstance(fn_or_string, str):
158
158
                    if attr in ['ccli']:
159
 
                        ustring = ''.join(re.findall('\d+', ustring))
 
159
                        ustring = ''.join(re.findall(r'\d+', ustring))
160
160
                        if ustring:
161
161
                            setattr(self, fn_or_string, int(ustring))
162
162
                        else:
231
231
                content = this_line[1:right_bracket].lower()
232
232
                # have we got any digits? If so, verse number is everything from the digits to the end (openlp does not
233
233
                # have concept of part verses, so just ignore any non integers on the end (including floats))
234
 
                match = re.match('(\D*)(\d+)', content)
 
234
                match = re.match(r'(\D*)(\d+)', content)
235
235
                if match is not None:
236
236
                    verse_tag = match.group(1)
237
237
                    verse_num = match.group(2)
303
303
            # whitespace.
304
304
            order = order.lower().split()
305
305
            for verse_def in order:
306
 
                match = re.match('(\D*)(\d+.*)', verse_def)
 
306
                match = re.match(r'(\D*)(\d+.*)', verse_def)
307
307
                if match is not None:
308
308
                    verse_tag = match.group(1)
309
309
                    verse_num = match.group(2)