Skip to content

Commit

Permalink
avoid linty issues in zcml files in updateing method for zcml files
Browse files Browse the repository at this point in the history
  • Loading branch information
MrTango committed Dec 4, 2018
1 parent 3f5775f commit 0bd258c
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 10 deletions.
4 changes: 2 additions & 2 deletions bobtemplates/plone/behavior.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def _update_package_configure_zcml(configurator):
insert_str = """
<include package=".behaviors" />
"""
"""
update_file(configurator, file_path, match_str, insert_str)


Expand Down Expand Up @@ -73,7 +73,7 @@ def _update_behaviors_configure_zcml(configurator):
marker=".{normalized_name}.I{klass_name}"
/>
""".format(
""".format(
title=configurator.variables['behavior_name_klass'],
description=configurator.variables['behavior_description'],
normalized_name=configurator.variables['behavior_name_normalized'],
Expand Down
4 changes: 2 additions & 2 deletions bobtemplates/plone/content_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def _update_rolemap_xml(configurator):
<role name="Contributor"/>
</permission>
""".format(
""".format(
configurator.variables['package.dottedname'],
configurator.variables['dexterity_type_name_klass'],
)
Expand Down Expand Up @@ -216,7 +216,7 @@ def _update_permissions_zcml(configurator):
title="{0}: Add {1}"
/>
""".format(
""".format(
configurator.variables['package.dottedname'],
configurator.variables['dexterity_type_name_klass'],
)
Expand Down
2 changes: 1 addition & 1 deletion bobtemplates/plone/portlet.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def _update_portlets_xml(configurator):
<!--<for interface="plone.app.portlets.interfaces.IDashboard" />-->
</portlet>
""".format(
""".format(
configurator.variables['portlet_configuration_name'],
configurator.variables['portlet_name'],
configurator.variables['portlet_name_normalized'],
Expand Down
6 changes: 3 additions & 3 deletions bobtemplates/plone/view.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def _update_views_configure_zcml(configurator):
template="{3}.pt"
permission="zope2.View"
/>
""".format(
""".format(
configurator.variables['view_name'],
configurator.variables['view_python_file_name'],
configurator.variables['view_python_class_name'],
Expand All @@ -95,7 +95,7 @@ def _update_views_configure_zcml(configurator):
template="{1}.pt"
permission="zope2.View"
/>
""".format(
""".format(
configurator.variables['view_name'],
configurator.variables['view_template_name'],
)
Expand All @@ -108,7 +108,7 @@ def _update_views_configure_zcml(configurator):
class=".{1}.{2}"
permission="zope2.View"
/>
""".format(
""".format(
configurator.variables['view_name'],
configurator.variables['view_python_file_name'],
configurator.variables['view_python_class_name'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ from {{{ package.dottedname }}} import _
{{% endif %}}
from Products.Five.browser import BrowserView
{{% if view_template %}}

# from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile
{{% endif %}}

Expand Down
4 changes: 2 additions & 2 deletions bobtemplates/plone/vocabulary.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def _update_package_configure_zcml(configurator):
insert_str = """
<include package=".vocabularies" />
"""
"""
update_file(configurator, file_path, match_str, insert_str)


Expand Down Expand Up @@ -67,7 +67,7 @@ def _update_vocabularies_configure_zcml(configurator):
name="{2}.{1}"
/>
""".format(
""".format(
configurator.variables['vocabulary_name_normalized'],
configurator.variables['vocabulary_name_klass'],
configurator.variables['package.dottedname'],
Expand Down

0 comments on commit 0bd258c

Please sign in to comment.