Cleanup E124 errors

pull/2000/head
Karl Hobley 2015-12-04 09:42:22 +00:00
rodzic 1f81b934f6
commit 6cd293f081
6 zmienionych plików z 13 dodań i 7 usunięć

Wyświetl plik

@ -5,7 +5,7 @@ usedevelop = True
envlist = py{27,33,34,35}-dj{17,18}-{sqlite,postgres,mysql}, flake8
[flake8]
ignore = E501,E128,E303,E124,E126
ignore = E501,E128,E303,E126
exclude = wagtail/project_template/*
[testenv]

Wyświetl plik

@ -13,7 +13,8 @@ from wagtail.wagtailcore.models import Page
class Command(BaseCommand):
help = "Checks for data integrity errors on the page tree, and fixes them where possible."
base_options = (
make_option('--noinput', action='store_false', dest='interactive', default=True,
make_option(
'--noinput', action='store_false', dest='interactive', default=True,
help='If provided, any fixes requiring user interaction will be skipped.'
),
)

Wyświetl plik

@ -17,7 +17,8 @@ def register_admin_urls():
@hooks.register('insert_editor_js')
def editor_js():
return format_html("""
return format_html(
"""
<script src="{0}{1}"></script>
<script>
window.chooserUrls.embedsChooser = '{2}';

Wyświetl plik

@ -128,14 +128,16 @@ class TestFormat(TestCase):
self.image,
'test alt text'
)
six.assertRegex(self, result,
six.assertRegex(
self, result,
'<img data-embedtype="image" data-id="0" data-format="test name" data-alt="test alt text" class="test classnames" src="[^"]+" width="1" height="1" alt="test alt text">',
)
def test_image_to_html_no_classnames(self):
self.format.classnames = None
result = self.format.image_to_html(self.image, 'test alt text')
six.assertRegex(self, result,
six.assertRegex(
self, result,
'<img src="[^"]+" width="1" height="1" alt="test alt text">'
)
self.format.classnames = 'test classnames'

Wyświetl plik

@ -58,7 +58,8 @@ class Command(BaseCommand):
rebuilder.finish()
option_list = BaseCommand.option_list + (
make_option('--backend',
make_option(
'--backend',
action='store',
dest='backend_name',
default=None,

Wyświetl plik

@ -32,7 +32,8 @@ def register_snippets_menu_item():
@hooks.register('insert_editor_js')
def editor_js():
return format_html("""
return format_html(
"""
<script src="{0}{1}"></script>
<script>window.chooserUrls.snippetChooser = '{2}';</script>
""",