Commit a8871500 authored by Jérome Perrin's avatar Jérome Perrin

deferred_style: Fix pylint warnings and enable coding style

parent c0f9e579
from Products.ERP5Type.Message import translateString from Products.ERP5Type.Message import translateString
portal = context.getPortalObject() portal = context.getPortalObject()
request = portal.REQUEST request = portal.REQUEST
format = request.get('format', '') format_ = request.get('format', '')
skin_name = request.get('deferred_portal_skin', portal.portal_skins.getDefaultSkin()) skin_name = request.get('deferred_portal_skin', portal.portal_skins.getDefaultSkin())
previous_skin_selection = request.get('previous_skin_selection', None) previous_skin_selection = request.get('previous_skin_selection', None)
...@@ -43,7 +43,7 @@ if hasattr(form, 'ZScriptHTML_tryParams'): ...@@ -43,7 +43,7 @@ if hasattr(form, 'ZScriptHTML_tryParams'):
for param in form.ZScriptHTML_tryParams(): for param in form.ZScriptHTML_tryParams():
params[param] = request.get(param) params[param] = request.get(param)
else: else:
params['format'] = format params['format'] = format_
activity_context.activate( activity_context.activate(
activity='SQLQueue', tag=tag, priority=priority).Base_renderSimpleView( activity='SQLQueue', tag=tag, priority=priority).Base_renderSimpleView(
......
...@@ -20,7 +20,7 @@ if person_value.getDefaultEmailText('') in ('', None): ...@@ -20,7 +20,7 @@ if person_value.getDefaultEmailText('') in ('', None):
tag = 'active-report-%s' % random.randint(0, 1000) tag = 'active-report-%s' % random.randint(0, 1000)
priority = 2 priority = 2
format = request.get('format', '') format_ = request.get('format', '')
skin_name = request['deferred_portal_skin'] skin_name = request['deferred_portal_skin']
# save request parameters (after calling the report_method which may tweak the # save request parameters (after calling the report_method which may tweak the
...@@ -36,7 +36,7 @@ context.activate(activity="SQLQueue", tag=tag, after_tag=after_tag, ...@@ -36,7 +36,7 @@ context.activate(activity="SQLQueue", tag=tag, after_tag=after_tag,
user_name=user.getId(), user_name=user.getId(),
tag=tag, tag=tag,
skin_name=skin_name, skin_name=skin_name,
format=format, format=format_,
priority=priority, priority=priority,
localizer_language=localizer_language, localizer_language=localizer_language,
**kw) **kw)
......
# pylint: disable=redefined-builtin
portal = context.getPortalObject() portal = context.getPortalObject()
form = context.restrictedTraverse(form) form = context.restrictedTraverse(form)
......
...@@ -16,7 +16,6 @@ with portal.Localizer.translationContext(localizer_language): ...@@ -16,7 +16,6 @@ with portal.Localizer.translationContext(localizer_language):
else: else:
form = None form = None
selection_name = request.get('prefixed_selection_name')
data = context.render_report_section.pt_render( data = context.render_report_section.pt_render(
extra_context=dict(form=form, extra_context=dict(form=form,
first=report_section_idx == 0, first=report_section_idx == 0,
......
from Products.ERP5Type.Message import translateString # pylint: disable=redefined-builtin
request = container.REQUEST request = container.REQUEST
request.other.update(request_other) request.other.update(request_other)
......
# pylint: disable=redefined-builtin
from Products.PythonScripts.standard import newline_to_br, html_quote from Products.PythonScripts.standard import newline_to_br, html_quote
portal = context.getPortalObject() portal = context.getPortalObject()
prefs = portal.portal_preferences prefs = portal.portal_preferences
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment