~raoul-snyman/openlp/pep440

« back to all changes in this revision

Viewing changes to openlp/plugins/bibles/lib/__init__.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:
217
217
        # add various Unicode alternatives
218
218
        source_string = source_string.replace('-', '(?:[-\u00AD\u2010\u2011\u2012\u2014\u2014\u2212\uFE63\uFF0D])')
219
219
        source_string = source_string.replace(',', '(?:[,\u201A])')
220
 
        REFERENCE_SEPARATORS['sep_{role}'.format(role=role)] = '\s*(?:{source})\s*'.format(source=source_string)
 
220
        REFERENCE_SEPARATORS['sep_{role}'.format(role=role)] = r'\s*(?:{source})\s*'.format(source=source_string)
221
221
        REFERENCE_SEPARATORS['sep_{role}_default'.format(role=role)] = default_separators[index]
222
222
    # verse range match: (<chapter>:)?<verse>(-((<chapter>:)?<verse>|end)?)?
223
223
    range_regex = '(?:(?P<from_chapter>[0-9]+){sep_v})?' \
255
255
 
256
256
 
257
257
def parse_reference(reference, bible, language_selection, book_ref_id=False):
258
 
    """
 
258
    r"""
259
259
    This is the next generation über-awesome function that takes a person's typed in string and converts it to a list
260
260
    of references to be queried from the Bible database files.
261
261