More pycodestyle fixes

This commit is contained in:
Tomas Groth 2018-07-04 22:42:55 +02:00
parent 318e90f893
commit 56a811c094
7 changed files with 10 additions and 9 deletions

View File

@ -39,7 +39,7 @@ log = logging.getLogger(__name__)
def _route_to_regex(route):
"""
r"""
Convert a route to a regular expression
For example:

View File

@ -19,7 +19,7 @@
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
###############################################################################
"""
r"""
This module is responsible for generating the HTML for :class:`~openlp.core.ui.maindisplay`. The ``build_html`` function
is the function which has to be called from outside. The generated and returned HTML will look similar to this::
@ -416,7 +416,7 @@ from openlp.core.lib.theme import BackgroundType, BackgroundGradientType, Vertic
log = logging.getLogger(__name__)
HTML_SRC = Template("""
HTML_SRC = Template(r"""
<!DOCTYPE html>
<html>
<head>

View File

@ -255,7 +255,7 @@ def get_reference_match(match_type):
def parse_reference(reference, bible, language_selection, book_ref_id=False):
"""
r"""
This is the next generation über-awesome function that takes a person's typed in string and converts it to a list
of references to be queried from the Bible database files.

View File

@ -73,7 +73,7 @@ class DreamBeamImport(SongImport):
Valid extensions for a DreamBeam song file are:
* \*.xml
* .xml
"""
def do_import(self):

View File

@ -70,7 +70,7 @@ class PowerSongImport(SongImport):
"""
Checks if source is a PowerSong 1.0 folder:
* is a directory
* contains at least one \*.song file
* contains at least one * .song file
:param openlp.core.common.path.Path import_source: Should be a Path object that fulfills the above criteria
:return: If the source is valid

View File

@ -238,13 +238,14 @@ class TestInit(TestCase, TestMixin):
Test the clean_filename() function
"""
# GIVEN: A invalid file name and the valid file name.
invalid_name = 'A_file_with_invalid_characters_[\\/:\*\?"<>\|\+\[\]%].py' # nopep8
wanted_name = 'A_file_with_invalid_characters______________________.py'
invalid_name = 'A_file_with_invalid_characters_[\\/:*?"<>|+[]%].py'
wanted_name = 'A_file_with_invalid_characters________________.py'
# WHEN: Clean the name.
result = clean_filename(invalid_name)
# THEN: The file name should be cleaned.
print(result)
assert wanted_name == result, 'The file name should not contain any special characters.'
def test_delete_file_no_path(self):

View File

@ -12,7 +12,7 @@ from openlp.core.lib.htmlbuilder import build_html, build_background_css, build_
from openlp.core.lib.theme import HorizontalType, VerticalType
from tests.helpers.testmixin import TestMixin
HTML = """
HTML = r"""
<!DOCTYPE html>
<html>
<head>