Index: quintagroup.plonecomments/trunk/quintagroup/plonecomments/browser/comments.py
===================================================================
--- quintagroup.plonecomments/trunk/quintagroup/plonecomments/browser/comments.py	(revision 3116)
+++ quintagroup.plonecomments/trunk/quintagroup/plonecomments/browser/comments.py	(revision 3117)
@@ -28,13 +28,15 @@
         portal_properties = getToolByName(self.context, 'portal_properties')
         try:
-            return portal_properties.qPloneComments.getProperty('enable_moderation', None)
+            return portal_properties.qPloneComments.getProperty(
+                'enable_moderation', None)
         except AttributeError:
             return False
 
     def can_moderate(self):
-        """ Returns a boolean indicating whether the user has the 'Moderate Discussion'
-            permission
+        """ Returns a boolean indicating whether the user has
+            the 'Moderate Discussion' permission
         """
-        return getSecurityManager().checkPermission('Moderate Discussion', aq_inner(self.context))
+        return getSecurityManager().checkPermission('Moderate Discussion',
+                                                    aq_inner(self.context))
 
     def getGravatar(self, reply):
@@ -45,13 +47,13 @@
 
         creator = reply.Creator()
-        if creator and not creator=='Anonymous User':
+        if creator and not creator == 'Anonymous User':
             mtool = getToolByName(self.context, "portal_membership")
             member = mtool.getMemberById(creator)
-            email = member and member.getProperty('email','') or ''
-            mem_id = getattr(member,'getId',lambda:'Anonymous User')()
+            email = member and member.getProperty('email', '') or ''
+            mem_id = getattr(member, 'getId', lambda: 'Anonymous User')()
             portrait = mtool.getPersonalPortrait(mem_id)
             portrait_url = portrait.absolute_url()
         else:
-            email = reply.getProperty('email',d='')
+            email = reply.getProperty('email', d='')
 
         if not email or not 'defaultUser.gif' in portrait_url:
@@ -61,6 +63,8 @@
         gravatar_url = "http://www.gravatar.com/avatar.php?"
         # construct the url
-        gravatar_url += urllib.urlencode({'gravatar_id':md5.md5(email).hexdigest(),
-            'default':portrait_url, 'size':str(size)})
+        gravatar_url += urllib.urlencode({
+            'gravatar_id': md5.md5(email).hexdigest(),
+            'default': portrait_url,
+            'size': str(size)})
         return gravatar_url
 
@@ -69,5 +73,6 @@
         portal_properties = getToolByName(self.context, 'portal_properties')
         prop_sheet = portal_properties['qPloneComments']
-        value = prop_sheet.getProperty('enable_authenticated_report_abuse', False)
+        value = prop_sheet.getProperty('enable_authenticated_report_abuse',
+                                       False)
         return value
 
@@ -107,5 +112,6 @@
 
     def submit_abuse_report(self):
-        """ Send an email with the abuse report message and hide abuse report form.
+        """ Send an email with the abuse report message and
+            hide abuse report form.
         """
         errors = {}
@@ -123,6 +129,8 @@
             # get the form controller
             controller = portal.portal_form_controller
-            # send the validate script to the form controller with the dummy state object
-            controller_state = controller.validate(dummy_controller_state, request, ['captcha_validator',])
+            # send the validate script to the form controller
+            # with the dummy state object
+            controller_state = controller.validate(dummy_controller_state,
+                                   request, ['captcha_validator', ])
             errors.update(controller_state.errors)
 
@@ -141,5 +149,6 @@
                                      member=member,
                                      **request.form)
-            node = ksscore.getHtmlIdSelector('span-reply-form-holder-%s' % comment_id)
+            node = ksscore.getHtmlIdSelector('span-reply-form-holder-%s' % \
+                                             comment_id)
             ksscore.replaceInnerHTML(node,  html)
             return self.render()
@@ -151,6 +160,8 @@
                                  member=member,
                                  **request.form)
-        node = ksscore.getHtmlIdSelector('span-reply-form-holder-%s' % comment_id)
-        html = '<br/><span style="color:red">You have reported this comment for abuse.</span>'
+        node = ksscore.getHtmlIdSelector('span-reply-form-holder-%s' % \
+                                         comment_id)
+        html = '<br/><span style="color:red">' \
+            'You have reported this comment for abuse.</span>'
         self.commands.addCommand('remove_abuse_report_form', 
                                  node, 
Index: quintagroup.plonecomments/trunk/quintagroup/plonecomments/patch.py
===================================================================
--- quintagroup.plonecomments/trunk/quintagroup/plonecomments/patch.py	(revision 3116)
+++ quintagroup.plonecomments/trunk/quintagroup/plonecomments/patch.py	(revision 3117)
@@ -59,4 +59,5 @@
     return id
 
+
 def getReplies(self):
     """Return a sequence of the DiscussionResponse objects which are
@@ -76,4 +77,5 @@
     return objects
 
+
 perms = DiscussionItemContainer.__ac_permissions__
 new_perms = []
Index: quintagroup.plonecomments/trunk/quintagroup/plonecomments/skins/quintagroup_plonecomments/deleteDiscussion.py
===================================================================
--- quintagroup.plonecomments/trunk/quintagroup/plonecomments/skins/quintagroup_plonecomments/deleteDiscussion.py	(revision 3116)
+++ quintagroup.plonecomments/trunk/quintagroup/plonecomments/skins/quintagroup_plonecomments/deleteDiscussion.py	(revision 3117)
@@ -22,5 +22,5 @@
 
 # remove the discussion item
-talkback.deleteReply( obj.getId() )
+talkback.deleteReply(obj.getId())
 manage_mails(obj, context, 'deleting')
 
@@ -31,3 +31,4 @@
 context.plone_utils.addPortalMessage(PloneMessageFactory(u'Reply deleted.'))
 
-context.REQUEST['RESPONSE'].redirect( redirect_target.absolute_url() + '/%s' % view )
+context.REQUEST['RESPONSE'].redirect(redirect_target.absolute_url() + \
+                                     '/%s' % view )
Index: quintagroup.plonecomments/trunk/quintagroup/plonecomments/tests/testQPloneCommentsConfiglet.py
===================================================================
--- quintagroup.plonecomments/trunk/quintagroup/plonecomments/tests/testQPloneCommentsConfiglet.py	(revision 3116)
+++ quintagroup.plonecomments/trunk/quintagroup/plonecomments/tests/testQPloneCommentsConfiglet.py	(revision 3117)
@@ -16,5 +16,5 @@
     self.membership = getToolByName(self.portal, 'portal_membership', None)
     for user_id in USERS.keys():
-        self.membership.addMember(user_id, USERS[user_id]['passw'] , USERS[user_id]['roles'], [])
+        self.membership.addMember(user_id, USERS[user_id]['passw'], USERS[user_id]['roles'], [])
 
     # Add users to Discussion Manager group
Index: quintagroup.plonecomments/trunk/quintagroup/plonecomments/tests/testQPloneCommentsReportAbuse.py
===================================================================
--- quintagroup.plonecomments/trunk/quintagroup/plonecomments/tests/testQPloneCommentsReportAbuse.py	(revision 3116)
+++ quintagroup.plonecomments/trunk/quintagroup/plonecomments/tests/testQPloneCommentsReportAbuse.py	(revision 3117)
@@ -22,5 +22,4 @@
         except:
             raise "Anonymous user CAN'T report abuse in turned ON *Anonymous report abuse mode*."
-
 
     def testAuthenticatedReportAbuse(self):
Index: quintagroup.plonecomments/trunk/quintagroup/plonecomments/utils.py
===================================================================
--- quintagroup.plonecomments/trunk/quintagroup/plonecomments/utils.py	(revision 3116)
+++ quintagroup.plonecomments/trunk/quintagroup/plonecomments/utils.py	(revision 3117)
@@ -42,5 +42,6 @@
 
     prop_sheet = context.portal_properties['qPloneComments']
-    props = filter(lambda x: prop_sheet.getProperty(x), prop_sheet.propertyIds())
+    props = filter(lambda x: prop_sheet.getProperty(x), \
+                   prop_sheet.propertyIds())
 
     actions = {
@@ -86,5 +87,6 @@
                 [obj.Creator(), ]
             userid = creators and creators[0] or ""
-            creator = getToolByName(context, 'portal_membership').getMemberById(userid)
+            portal_membership = getToolByName(context, 'portal_membership')
+            creator = portal_membership.getMemberById(userid)
             if creator and allowEmail(context, reply, state, creator):
                 return creator.getProperty('email', '')
@@ -105,5 +107,6 @@
     def getParentOwnerEmail(reply, context):
         creator_id = getParent(reply).getOwnerTuple()[1]
-        creator = getToolByName(context, 'portal_membership').getMemberById(creator_id)
+        portal_membership = getToolByName(context, 'portal_membership')
+        creator = portal_membership.getMemberById(creator_id)
         if creator and allowEmail(context, reply, state, creator):
             return creator.getProperty('email', '')
@@ -117,5 +120,6 @@
     organization_name = getProp(context, 'email_subject_prefix', '')
     creator_name = reply.getOwnerTuple()[1]
-    admin_email = context.portal_url.getPortalObject().getProperty('email_from_address')
+    portal = getToolByName(context, 'portal_url').getPortalObject()
+    admin_email = portal.getProperty('email_from_address')
     translate = getToolByName(context, 'translation_service').translate
     subject = ''
@@ -123,5 +127,6 @@
         subject = translate(_(u"approve_user_notification_subject",
             default=u"Your comment on ${title} is now published",
-            mapping={u"title": safe_unicode(getParent(context).title_or_id())}),
+            mapping={u"title":
+                safe_unicode(getParent(context).title_or_id())}),
             context=context.REQUEST)
         if user_email:
@@ -138,5 +143,6 @@
         subject = translate(_(u"rejected_user_notification_subject",
             default=u"Your comment on ${title} was not approved",
-            mapping={u"title": safe_unicode(getParent(context).title_or_id())}),
+            mapping={u"title":
+                safe_unicode(getParent(context).title_or_id())}),
             context=context.REQUEST)
         if user_email:
@@ -154,5 +160,6 @@
         subject = translate(_(u"reply_user_notification_subject",
             default=u"Someone replied to your comment on ${title}",
-            mapping={u"title": safe_unicode(getParent(context).title_or_id())}),
+            mapping={u"title":
+                safe_unicode(getParent(context).title_or_id())}),
             context=context.REQUEST)
         di_parrent = getDIParent(reply)
@@ -200,5 +207,6 @@
             args = {}
 
-    elif state in ('enable_authenticated_report_abuse', 'enable_anonymous_report_abuse'):
+    elif state in ('enable_authenticated_report_abuse',
+                   'enable_anonymous_report_abuse'):
         template = 'report_abuse_template'
         user_email = getProp(context, "email_discussion_manager", None)
@@ -230,5 +238,6 @@
     if args:
         msg = getMsg(context, template, args)
-        charset = context.portal_properties.site_properties.getProperty('default_charset', 'utf-8')
+        site_properties = context.portal_properties.site_properties
+        charset = site_properties.getProperty('default_charset', 'utf-8')
         msg = msg.encode(charset)
         host = context.plone_utils.getMailHost()
@@ -236,5 +245,5 @@
             host.secureSend(msg, user_email, admin_email, subject=subject,
                             subtype='plain', debug=False, charset=charset)
-        except (smtplib.SMTPRecipientsRefused,smtplib.SMTPServerDisconnected):
+        except (smtplib.SMTPRecipientsRefused, smtplib.SMTPServerDisconnected):
             setStatusMsg(None, context,
                 _('Could not send the email notification. Have you configured an email server for Plone?'))
