Index: /quintagroup.analytics/trunk/quintagroup/analytics/browser/views.py
===================================================================
--- /quintagroup.analytics/trunk/quintagroup/analytics/browser/views.py	(revision 3168)
+++ /quintagroup.analytics/trunk/quintagroup/analytics/browser/views.py	(revision 3169)
@@ -14,12 +14,14 @@
 except ImportError:
     "Before plon4 we don't have an annotation storage for settings."
-    IPortletAssignmentSettings = lambda assignment:{}
+    IPortletAssignmentSettings = lambda assignment: {}
 
 from GChartWrapper import VerticalBarStack
 
 from quintagroup.analytics.config import COLORS, OTHER_TYPES, NO_WF_BIND
+
 
 class OwnershipByType(BrowserView):
     MAX = 10
+
     def __init__(self, context, request):
         self.context = context
@@ -87,16 +89,17 @@
         for type_ in types:
             data.append(self.getContent(type_))
-        other = [self.getContent(t) for t in self.getTypes(all=True)[self.MAX:]]
+        other = [self.getContent(t) for t in self.getTypes(
+                                                    all=True)[self.MAX:]]
         if other:
             data.append([sum(l) for l in zip(*other)])
         max_value = max(self.getTotal())
         chart = VerticalBarStack(data, encoding='text')
-        types = other and types+OTHER_TYPES or types
+        types = other and types + OTHER_TYPES or types
         chart.title('Content ownership by type').legend(*(types))
         chart.bar('a', 10, 0).legend_pos("b")
         chart.color(*COLORS)
-        chart.size(800, 375).scale(0,max_value).axes('xy').label(*self.users)
+        chart.size(800, 375).scale(0, max_value).axes('xy').label(*self.users)
         chart.axes.type("y")
-        chart.axes.range(0,0,max_value)
+        chart.axes.range(0, 0, max_value)
         return chart.img()
 
@@ -104,4 +107,5 @@
 class OwnershipByState(BrowserView):
     MAX = 10
+
     def __init__(self, context, request):
         self.context = context
@@ -160,5 +164,6 @@
                     data.append(l)
             if len(data) > 0:
-                self.data[NO_WF_BIND] = map(lambda t,d:t-d, self.data[NO_WF_BIND], data)
+                self.data[NO_WF_BIND] = map(lambda t, d: t - d,
+                                            self.data[NO_WF_BIND], data)
         return self.data[type_]
 
@@ -181,10 +186,11 @@
         max_value = max(self.getTotal())
         chart = VerticalBarStack(data, encoding='text')
-        chart.title('Content ownership by state').legend(*self.states+[NO_WF_BIND])
+        title = 'Content ownership by state'
+        chart.title(title).legend(*self.states + [NO_WF_BIND])
         chart.bar('a', 10, 0).legend_pos("b")
         chart.color(*COLORS)
-        chart.size(800, 375).scale(0,max_value).axes('xy').label(*self.users)
+        chart.size(800, 375).scale(0, max_value).axes('xy').label(*self.users)
         chart.axes.type("y")
-        chart.axes.range(0,0,max_value)
+        chart.axes.range(0, 0, max_value)
         return chart.img()
 
@@ -192,4 +198,5 @@
 class TypeByState(BrowserView):
     MAX = 10
+
     def __init__(self, context, request):
         self.context = context
@@ -249,5 +256,6 @@
                     data.append(l)
             if len(data) > 0:
-                self.data[NO_WF_BIND] = map(lambda t,d:t-d, self.data[NO_WF_BIND], data)
+                self.data[NO_WF_BIND] = map(lambda t, d: t - d,
+                                            self.data[NO_WF_BIND], data)
         return self.data[state]
 
@@ -270,10 +278,11 @@
         max_value = max(self.getTotal())
         chart = VerticalBarStack(data, encoding='text')
-        chart.title('Content type by state').legend(*self.states+[NO_WF_BIND])
+        chart.title('Content type by state').legend(
+            *self.states + [NO_WF_BIND])
         chart.bar('a', 10, 0).legend_pos("b")
         chart.color(*COLORS)
-        chart.size(800, 375).scale(0,max_value).axes('xy').label(*self.types)
+        chart.size(800, 375).scale(0, max_value).axes('xy').label(*self.types)
         chart.axes.type("y")
-        chart.axes.range(0,0,max_value)
+        chart.axes.range(0, 0, max_value)
         return chart.img()
 
@@ -300,15 +309,18 @@
             if obj.hasProperty('left_slots'):
                 info['left_slots'] = obj.getProperty('left_slots')
-                self.expressions = self.expressions.union(set(info['left_slots']))
+                self.expressions = self.expressions.union(
+                                            set(info['left_slots']))
             if obj.hasProperty('right_slots'):
                 info['right_slots'] = obj.getProperty('right_slots')
-                self.expressions = self.expressions.union(set(info['right_slots']))
+                self.expressions = self.expressions.union(
+                                            set(info['right_slots']))
         return info
 
     def _walk(self, obj, level=-1):
         yield self._getInfo(obj)
-        if level != 0 and (IFolderish.providedBy(obj) or IBaseFolder.providedBy(obj)):
+        if level != 0 and (IFolderish.providedBy(obj) \
+                       or IBaseFolder.providedBy(obj)):
             for v in obj.contentValues():
-                for i in self._walk(v, level-1):
+                for i in self._walk(v, level - 1):
                     yield i
 
@@ -321,5 +333,6 @@
         infos = []
         for i in self._walk(self.context, level):
-            if self.DEBUG or i['left_slots'] is not None or i['right_slots'] is not None:
+            if self.DEBUG or i['left_slots'] is not None \
+                          or i['right_slots'] is not None:
                 infos.append(i)
         self.total = len(infos)
@@ -341,4 +354,5 @@
         return exprs
 
+
 class PropertiesStats(BrowserView):
     def __init__(self, context, request):
@@ -362,5 +376,6 @@
         if IPropertyManager.providedBy(obj):
             obj = aq_base(obj)
-            self.proplist.extend([i for i in obj.propertyIds() if i not in self.proplist])
+            self.proplist.extend(
+                    [i for i in obj.propertyIds() if i not in self.proplist])
             if obj.hasProperty(self.propname):
                 info['slots'] = obj.getProperty(self.propname)
@@ -368,14 +383,17 @@
                     info['slots'] = str(info['slots'])
                 if not isinstance(info['slots'], basestring):
-                    self.expressions = self.expressions.union(set(info['slots']))
-                else:
-                    self.expressions = self.expressions.union(set([info['slots']]))
+                    self.expressions = self.expressions.union(
+                                                set(info['slots']))
+                else:
+                    self.expressions = self.expressions.union(
+                                                set([info['slots']]))
         return info
 
     def _walk(self, obj, level=-1):
         yield self._getInfo(obj)
-        if level != 0 and (IFolderish.providedBy(obj) or IBaseFolder.providedBy(obj)):
+        if level != 0 and (IFolderish.providedBy(obj) \
+                       or IBaseFolder.providedBy(obj)):
             for v in obj.contentValues():
-                for i in self._walk(v, level-1):
+                for i in self._walk(v, level - 1):
                     yield i
 
@@ -405,4 +423,5 @@
         return exprs
 
+
 class PortletsStats(BrowserView):
     def __init__(self, context, request):
@@ -416,28 +435,40 @@
 
     def getAssignmentMappingUrl(self, context, manager):
-        baseUrl = str(getMultiAdapter((context, self.request), name='absolute_url'))
+        baseUrl = str(getMultiAdapter((context, self.request),
+                                      name='absolute_url'))
         return '%s/++contextportlets++%s' % (baseUrl, manager.__name__)
 
     def getAssignmentsForManager(self, context, manager):
-        assignments = getMultiAdapter((context, manager), IPortletAssignmentMapping)
+        assignments = getMultiAdapter((context, manager),
+                                      IPortletAssignmentMapping)
         return assignments.values()
 
     def getPortletsMapping(self, context):
-        leftcolumn = getUtility(IPortletManager, name=u'plone.leftcolumn', context=context)
-        rightcolumn = getUtility(IPortletManager, name=u'plone.rightcolumn', context=context)
-        leftmapping = getMultiAdapter((context, leftcolumn,), IPortletAssignmentMapping)
-        rightmapping = getMultiAdapter((context, rightcolumn,), IPortletAssignmentMapping)
+        leftcolumn = getUtility(IPortletManager, name=u'plone.leftcolumn',
+                                context=context)
+        rightcolumn = getUtility(IPortletManager, name=u'plone.rightcolumn',
+                                 context=context)
+        leftmapping = getMultiAdapter((context, leftcolumn,),
+                                      IPortletAssignmentMapping)
+        rightmapping = getMultiAdapter((context, rightcolumn,),
+                                       IPortletAssignmentMapping)
         return (leftmapping, rightmapping)
 
     def getLocalPortletsManager(self, context):
-        leftcolumn = getUtility(IPortletManager, name='plone.leftcolumn', context=context)
-        rightcolumn = getUtility(IPortletManager, name='plone.rightcolumn', context=context)
-        leftmanager = getMultiAdapter((context, leftcolumn,), ILocalPortletAssignmentManager)
-        rightmanager = getMultiAdapter((context, rightcolumn,), ILocalPortletAssignmentManager)
+        leftcolumn = getUtility(IPortletManager, name='plone.leftcolumn',
+                                context=context)
+        rightcolumn = getUtility(IPortletManager, name='plone.rightcolumn',
+                                 context=context)
+        leftmanager = getMultiAdapter((context, leftcolumn,),
+                                      ILocalPortletAssignmentManager)
+        rightmanager = getMultiAdapter((context, rightcolumn,),
+                                       ILocalPortletAssignmentManager)
         return (leftmanager, rightmanager)
 
     def getPortletsManager(self, context):
-        left = getUtility(IPortletManager, name='plone.leftcolumn', context=context)
-        right = getUtility(IPortletManager, name='plone.rightcolumn', context=context)
+        left = getUtility(IPortletManager, name='plone.leftcolumn',
+                          context=context)
+        right = getUtility(IPortletManager, name='plone.rightcolumn',
+                           context=context)
         return (left, right)
 
@@ -458,7 +489,7 @@
 
             data.append({
-                'title'      : assignments[idx].title,
-                'editview'   : editviewName,
-                'visible'    : settings.get('visible', True),
+                'title': assignments[idx].title,
+                'editview': editviewName,
+                'visible': settings.get('visible', True),
                 })
         return data
@@ -481,5 +512,5 @@
         #leftmanager, rightmanager = self.getLocalPortletsManager(obj)
         #info['left_slots'] = self.getPortlets(obj, leftmapping, leftmanager)
-        #info['right_slots'] = self.getPortlets(obj, rightmapping, rightmanager)
+        #info['right_slots'] = self.getPortlets(obj, rightmapping,rightmanager)
         lass = self.getAssignmentsForManager(obj, left)
         rass = self.getAssignmentsForManager(obj, right)
@@ -489,6 +520,6 @@
         prass = self.portlets_for_assignments(rass, right, rurl)
         #print obj, plass, prass
-        info['left_slots'] = plass #[i['title'] for i in plass]
-        info['right_slots'] = prass #[i['title'] for i in prass]
+        info['left_slots'] = plass  # [i['title'] for i in plass]
+        info['right_slots'] = prass  # [i['title'] for i in prass]
         return info
 
@@ -498,7 +529,8 @@
         except:
             pass
-        if level != 0 and (IFolderish.providedBy(obj) or IBaseFolder.providedBy(obj)):
+        if level != 0 and (IFolderish.providedBy(obj) \
+                       or IBaseFolder.providedBy(obj)):
             for v in obj.contentValues():
-                for i in self._walk(v, level-1):
+                for i in self._walk(v, level - 1):
                     yield i
 
@@ -511,5 +543,6 @@
         infos = []
         for i in self._walk(self.context, level):
-            if self.DEBUG or i['left_slots'] is not None or i['right_slots'] is not None:
+            if self.DEBUG or i['left_slots'] is not None \
+                          or i['right_slots'] is not None:
                 infos.append(i)
         self.total = len(infos)
Index: /quintagroup.analytics/trunk/quintagroup/analytics/config.py
===================================================================
--- /quintagroup.analytics/trunk/quintagroup/analytics/config.py	(revision 3168)
+++ /quintagroup.analytics/trunk/quintagroup/analytics/config.py	(revision 3169)
@@ -1,3 +1,4 @@
-COLORS = ['669933', 'CC9966', '993300', 'FF6633', 'E8E4E3', 'A9A486', 'DCB57E', 'FFCC99', '996633', '333300', '00FF00']
+COLORS = ['669933', 'CC9966', '993300', 'FF6633', 'E8E4E3', 'A9A486',
+          'DCB57E', 'FFCC99', '996633', '333300', '00FF00']
 OTHER_TYPES = ['Other types']
 NO_WF_BIND = 'No workflow'
Index: /quintagroup.analytics/trunk/quintagroup/analytics/tests.py
===================================================================
--- /quintagroup.analytics/trunk/quintagroup/analytics/tests.py	(revision 3168)
+++ /quintagroup.analytics/trunk/quintagroup/analytics/tests.py	(revision 3169)
@@ -17,4 +17,5 @@
 
 ptc.setupPloneSite()
+
 
 class Installed(PloneSite):
@@ -41,9 +42,10 @@
             pass
 
+
 class SetUpContent(Installed):
 
     max = 10
     types_ = ['Document', 'Event', 'Folder']
-    users = [('user%s'%i, 'user%s'%i, 'Member', None)
+    users = [('user%s' % i, 'user%s' % i, 'Member', None)
              for i in xrange(max)]
 
@@ -71,8 +73,8 @@
                 user = user.__of__(uf)
             newSecurityManager(None, user)
-            for i in xrange(users.index(u)+cls.max):
-                map(folder.invokeFactory, cls.types_, [t+str(i) for t in cls.types_])
+            for i in xrange(users.index(u) + cls.max):
+                map(folder.invokeFactory, cls.types_,
+                    [t + str(i) for t in cls.types_])
         transaction.commit()
-
 
     @classmethod
@@ -87,4 +89,5 @@
         pass
 
+
 class TestCase(ptc.PloneTestCase):
     layer = Installed
@@ -99,6 +102,7 @@
         """This test validates control panel action. """
         control_panel = self.portal.portal_controlpanel
-        self.assert_('QAnalytics' in [a.id for a in control_panel.listActions()],
-                     "Configlet for quintagroup.analitycs isn't registered.")
+        self.assert_(
+                'QAnalytics' in [a.id for a in control_panel.listActions()],
+                "Configlet for quintagroup.analitycs isn't registered.")
 
     def test_OwnershipByType(self):
@@ -147,5 +151,4 @@
         self.assert_(view, "Properties Stats view isn't registered")
 
-
     def test_PortletsStats(self):
         """ This test validates registration of
@@ -156,4 +159,5 @@
 
         self.assert_(view, "Portlets Stats view isn't registered")
+
 
 class TestOwnershipByType(TestCase):
@@ -171,5 +175,5 @@
         users = [u[0] for u in self.layer.users]
         users.reverse()
-        self.assert_(False not in map(lambda u1, u2:u1==u2,
+        self.assert_(False not in map(lambda u1, u2: u1 == u2,
                      users, self.view.getUsers()))
 
@@ -190,5 +194,5 @@
         data.reverse()
         types = [i[0] for i in data]
-        self.assert_(False not in map(lambda t1, t2:t1==t2,
+        self.assert_(False not in map(lambda t1, t2: t1 == t2,
                      self.view.getTypes(), types))
 
@@ -204,5 +208,6 @@
         for type_ in self.layer.types_:
             self.assert_(False not in \
-            map(lambda i, j:i==j, [len(self.pc(portal_type=type_, Creator=user))
+            map(lambda i, j: i == j, [len(self.pc(portal_type=type_,
+                                               Creator=user))
                                    for user in self.view.getUsers()],
                                   self.view.getContent(type_)))
@@ -216,6 +221,7 @@
              19.0,18.0,17.0,16.0,15.0,14.0,13.0,12.0,11.0,10.0|0.0,
              0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0|0.0,0.0,0.0,0.0,
-             0.0,0.0,0.0,0.0,0.0,0.0&amp;chxr=0,0,57&amp;chco=669933,cc9966,
-             993300,ff6633,e8e4e3,a9a486,dcb57e,ffcc99,996633,333300,00ff00&amp;
+             0.0,0.0,0.0,0.0,0.0,0.0&amp;chxr=0,0,57&amp;
+             chco=669933,cc9966,993300,ff6633,e8e4e3,a9a486,
+             dcb57e,ffcc99,996633,333300,00ff00&amp;
              chl=user9|user8|user7|user6|user5|user4|user3|user2|user1|
              user0&amp;chbh=a,10,0&amp;chs=800x375&amp;cht=bvs&amp;
@@ -239,6 +245,7 @@
 
         self.loginAsPortalOwner()
-        self.assertEqual(*map(lambda s:''.join(s.split()),
+        self.assertEqual(*map(lambda s: ''.join(s.split()),
                               [chart_tag, self.view.getChart()]))
+
 
 class TestOwnershipByState(TestCase):
@@ -258,10 +265,10 @@
         users = [u[0] for u in self.layer.users]
         users.reverse()
-        self.assert_(False not in map(lambda u1, u2:u1==u2,
+        self.assert_(False not in map(lambda u1, u2: u1 == u2,
                      users, self.view.getUsers()))
 
     def test_getStates(self):
         """ Tests method that returns ordered list of states."""
-        self.assert_(False not in map(lambda s1, s2:s1==s2,
+        self.assert_(False not in map(lambda s1, s2: s1 == s2,
                      ['private', 'published'], self.view.getStates()))
 
@@ -277,5 +284,6 @@
         for state in self.states:
             self.assert_(False not in \
-            map(lambda i, j:i==j,[len(self.pc(review_state=state, Creator=user))
+            map(lambda i, j: i == j, [len(self.pc(review_state=state,
+                                              Creator=user))
                                   for user in self.view.getUsers()],
                                  self.view.getContent(state)))
@@ -294,6 +302,7 @@
                        published|No+workflow&amp;chdlp=b"/>"""
         self.loginAsPortalOwner()
-        self.assertEqual(*map(lambda s:''.join(s.split()),
+        self.assertEqual(*map(lambda s: ''.join(s.split()),
                               [chart_tag, self.view.getChart()]))
+
 
 class TestTypeByState(TestCase):
@@ -323,10 +332,10 @@
         data.reverse()
         types = [i[0] for i in data]
-        self.assert_(False not in map(lambda t1, t2:t1==t2, types,
+        self.assert_(False not in map(lambda t1, t2: t1 == t2, types,
                                       self.view.getTypes()))
 
     def test_getStates(self):
         """ Tests method that returns ordered list of states."""
-        self.assert_(False not in map(lambda s1, s2:s1==s2,
+        self.assert_(False not in map(lambda s1, s2: s1 == s2,
                      ['private', 'published'], self.view.getStates()))
 
@@ -342,5 +351,5 @@
         for state in self.states:
             self.assert_(False not in \
-            map(lambda i, j:i==j, [len(self.pc(portal_type=type_,
+            map(lambda i, j: i == j, [len(self.pc(portal_type=type_,
                                                review_state=state))
                                    for type_ in self.view.getTypes()],
@@ -373,11 +382,11 @@
 
         self.loginAsPortalOwner()
-        self.assertEqual(*map(lambda s:''.join(s.split()),
+        self.assertEqual(*map(lambda s: ''.join(s.split()),
                               [chart_tag, self.view.getChart()]))
+
 
 class LegacyPortlets(TestCase):
     """Test all legasy_portlets view methods."""
 
-
     def afterSetUp(self):
         self.view = queryMultiAdapter((self.portal, self.portal.REQUEST),
@@ -395,4 +404,5 @@
         # this is true for Plone 4
         self.assert_(self.view.getAllPortletExpressions() == [])
+
 
 class TestPropertiesStats(TestCase):
@@ -429,5 +439,5 @@
         mapping.restrictedTraverse('+/' + portlet.addview)()
 
-        plone_portlets_info = filter(lambda info:info['path'] == '/plone',
+        plone_portlets_info = filter(lambda info: info['path'] == '/plone',
                                      self.view.getPropsList())
         lslots = plone_portlets_info[0]['left_slots']
Index: /quintagroup.analytics/trunk/setup.py
===================================================================
--- /quintagroup.analytics/trunk/setup.py	(revision 3168)
+++ /quintagroup.analytics/trunk/setup.py	(revision 3169)
@@ -9,5 +9,4 @@
       long_description=open("README.txt").read() + "\n" +
                        open(os.path.join("docs", "HISTORY.txt")).read(),
-      # Get more strings from http://www.python.org/pypi?%3Aaction=list_classifiers
       classifiers=[
         "Framework :: Plone",
