kopia lustrzana https://github.com/wagtail/wagtail
Cleanup E124 errors
rodzic
1f81b934f6
commit
6cd293f081
2
tox.ini
2
tox.ini
|
@ -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]
|
||||
|
|
|
@ -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.'
|
||||
),
|
||||
)
|
||||
|
|
|
@ -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}';
|
||||
|
|
|
@ -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'
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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>
|
||||
""",
|
||||
|
|
Ładowanie…
Reference in New Issue