From 2d4f7fd6654a3d206e00e86bc49931c093d4b9bf Mon Sep 17 00:00:00 2001 From: tisto Date: Sat, 14 Jan 2012 07:30:43 +0100 Subject: [PATCH] Pep8 --- plone/app/discussion/__init__.py | 2 +- plone/app/discussion/browser/validator.py | 2 +- plone/app/discussion/interfaces.py | 23 ++++++++++++----------- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/plone/app/discussion/__init__.py b/plone/app/discussion/__init__.py index 11103ca..508015d 100644 --- a/plone/app/discussion/__init__.py +++ b/plone/app/discussion/__init__.py @@ -1,4 +1,4 @@ # -*- coding: utf-8 -*- from zope.i18nmessageid import MessageFactory -PloneAppDiscussionMessageFactory = MessageFactory('plone.app.discussion') \ No newline at end of file +PloneAppDiscussionMessageFactory = MessageFactory('plone.app.discussion') diff --git a/plone/app/discussion/browser/validator.py b/plone/app/discussion/browser/validator.py index 93b2181..87d4914 100644 --- a/plone/app/discussion/browser/validator.py +++ b/plone/app/discussion/browser/validator.py @@ -36,6 +36,7 @@ try: except ImportError: pass + class CaptchaValidator(validator.SimpleFieldValidator): implements(IValidator) adapts(Interface, IDiscussionLayer, Interface, IField, Interface) @@ -63,4 +64,3 @@ class CaptchaValidator(validator.SimpleFieldValidator): # Register Captcha validator for the Captcha field in the ICaptcha Form validator.WidgetValidatorDiscriminators(CaptchaValidator, field=ICaptcha['captcha']) - diff --git a/plone/app/discussion/interfaces.py b/plone/app/discussion/interfaces.py index adcb38d..7f18b4e 100644 --- a/plone/app/discussion/interfaces.py +++ b/plone/app/discussion/interfaces.py @@ -50,16 +50,15 @@ class IDiscussionSettings(Interface): description=_(u"help_moderation_enabled", default=u"If selected, comments will enter a 'Pending' state " "in which they are invisible to the public. A user " - "with the 'Review comments' permission ('Reviewer' or " - "'Manager') can approve comments to make them visible " - "to the public. If you want to enable a custom " - "comment workflow, you have to go to the types " - "control panel."), + "with the 'Review comments' permission ('Reviewer' " + "or 'Manager') can approve comments to make them " + "visible to the public. If you want to enable a " + "custom comment workflow, you have to go to the " + "types control panel."), required=False, default=False, ) - text_transform = schema.Choice( title=_(u"label_text_transform", default="Comment text transform"), @@ -114,11 +113,12 @@ class IDiscussionSettings(Interface): ) moderator_email = schema.ASCIILine( - title = _(u'label_moderator_email', default=u'Moderator Email Address'), - description = _(u'help_moderator_email', - default=u"Address to which moderator notifications " - u"will be sent."), - required = False, + title=_(u'label_moderator_email', + default=u'Moderator Email Address'), + description=_(u'help_moderator_email', + default=u"Address to which moderator notifications " + u"will be sent."), + required=False, ) user_notification_enabled = schema.Bool( @@ -322,6 +322,7 @@ class ICommentingTool(Interface): """Perform a search over all indexed comments. """ + class IDiscussionLayer(Interface): """Request marker installed via browserlayer.xml. """