Index: /quintagroup.canonicalpath/trunk/quintagroup/canonicalpath/adapters.py
===================================================================
--- /quintagroup.canonicalpath/trunk/quintagroup/canonicalpath/adapters.py	(revision 3144)
+++ /quintagroup.canonicalpath/trunk/quintagroup/canonicalpath/adapters.py	(revision 3145)
@@ -55,5 +55,5 @@
         """
         if self.context.hasProperty(self.prop):
-            self.context.manage_delProperties(ids=[self.prop,])
+            self.context.manage_delProperties(ids=[self.prop, ])
 
 
@@ -86,8 +86,8 @@
     def __init__(self, context):
         super(DefaultCanonicalPathAdapter, self).__init__(context)
-        self.purl = getToolByName(self.context,'portal_url')
+        self.purl = getToolByName(self.context, 'portal_url')
 
     def getDefault(self):
-        return '/'+'/'.join(self.purl.getRelativeContentPath(self.context))
+        return '/' + '/'.join(self.purl.getRelativeContentPath(self.context))
 
     canonical_path = property(DefaultCanonicalAdapter.getProp,
Index: /quintagroup.canonicalpath/trunk/quintagroup/canonicalpath/catalog.py
===================================================================
--- /quintagroup.canonicalpath/trunk/quintagroup/canonicalpath/catalog.py	(revision 3144)
+++ /quintagroup.canonicalpath/trunk/quintagroup/canonicalpath/catalog.py	(revision 3145)
@@ -2,23 +2,27 @@
 from zope.component import queryAdapter
 
-#for compatibility with older plone versions 
+#for compatibility with older plone versions
 try:
-    from plone.indexer.decorator import indexer 
+    from plone.indexer.decorator import indexer
     IS_NEW = True
 except:
     IS_NEW = False
-    class IDummyInterface:pass
+
+    class IDummyInterface:
+        pass
+
     class indexer:
 
-         def __init__(self, *interfaces):
+        def __init__(self, *interfaces):
             self.interfaces = IDummyInterface,
 
-         def __call__(self, callable):
-             callable.__component_adapts__ = self.interfaces
-             callable.__implemented__ = Interface
-             return callable
-    
+        def __call__(self, callable):
+            callable.__component_adapts__ = self.interfaces
+            callable.__implemented__ = Interface
+            return callable
+
 from interfaces import ICanonicalPath
 from interfaces import ICanonicalLink
+
 
 @indexer(Interface)
@@ -31,4 +35,5 @@
     return None
 
+
 @indexer(Interface)
 def canonical_link(obj, **kwargs):
@@ -40,5 +45,5 @@
     return None
 
-#for compatibility with older plone versions 
+#for compatibility with older plone versions
 if not IS_NEW:
     from Products.CMFPlone.CatalogTool import registerIndexableAttribute
Index: /quintagroup.canonicalpath/trunk/quintagroup/canonicalpath/interfaces.py
===================================================================
--- /quintagroup.canonicalpath/trunk/quintagroup/canonicalpath/interfaces.py	(revision 3144)
+++ /quintagroup.canonicalpath/trunk/quintagroup/canonicalpath/interfaces.py	(revision 3145)
@@ -1,3 +1,4 @@
 from zope.interface import Interface, Attribute
+
 
 class ICanonicalPath(Interface):
@@ -9,4 +10,5 @@
         "*setter* and *getter* for the attribute")
 
+
 class ICanonicalLink(Interface):
     """canonical_link provider interface
@@ -16,3 +18,2 @@
         "canonical_link - for the object. Adapter must implement "
         "*setter* and *getter* for the attribute")
-
Index: /quintagroup.canonicalpath/trunk/quintagroup/canonicalpath/tests.py
===================================================================
--- /quintagroup.canonicalpath/trunk/quintagroup/canonicalpath/tests.py	(revision 3144)
+++ /quintagroup.canonicalpath/trunk/quintagroup/canonicalpath/tests.py	(revision 3145)
@@ -6,5 +6,5 @@
 from zope.schema.interfaces import InvalidValue
 
-#for compatibility with older plone versions 
+#for compatibility with older plone versions
 try:
     from plone.indexer.interfaces import IIndexableObject
@@ -35,10 +35,13 @@
 from quintagroup.canonicalpath.upgrades import CanonicalConvertor
 
+
 def registerCanonicalPathInReg():
-    import quintagroup.canonicalpath, Products.Five
+    import quintagroup.canonicalpath
+    import Products.Five
     fiveconfigure.debug_mode = True
     zcml.load_config('meta.zcml', Products.Five)
     zcml.load_config('configure.zcml', quintagroup.canonicalpath)
     fiveconfigure.debug_mode = False
+
 
 class TestCase(ptc.PloneTestCase):
@@ -54,4 +57,5 @@
 ptc.setupPloneSite()
 
+
 class TestIndexerRegistration(TestCase):
 
@@ -59,5 +63,6 @@
         self.loginAsPortalOwner()
         self.catalog = getToolByName(self.portal, 'portal_catalog')
-        self.my_doc = makeContent(self.portal, portal_type='Document', id='my_doc')
+        self.my_doc = makeContent(self.portal, portal_type='Document',
+                                  id='my_doc')
         self.logout()
 
@@ -66,5 +71,6 @@
             wrapper = None
             if not IIndexableObject.providedBy(obj):
-                wrapper = queryMultiAdapter((obj, self.catalog), IIndexableObject)
+                wrapper = queryMultiAdapter((obj, self.catalog),
+                                            IIndexableObject)
         else:
             wf = getattr(self.portal, 'portal_workflow', None)
@@ -73,25 +79,28 @@
             else:
                 vars = {}
-            wrapper = getMultiAdapter((obj, self.portal), _old_IIndexableObjectWrapper)
+            wrapper = getMultiAdapter((obj, self.portal),
+                                      _old_IIndexableObjectWrapper)
             wrapper.update(vars)
-            
+
         return wrapper and wrapper or obj
 
     def testForAT(self):
         wrapper = self.get_indexable_wrapper(self.my_doc)
-        self.assertFalse(wrapper is None, "No indexer registered for document object")
+        self.assertFalse(wrapper is None,
+                         "No indexer registered for document object")
 
     def testCanonicalPathForAT(self):
         wrapper = self.get_indexable_wrapper(self.my_doc)
         self.assertTrue(hasattr(wrapper, 'canonical_path'),
-            "'canonical_path' attribute not accessible with indexer wrapper for Document object")
+                        "'canonical_path' attribute not accessible with "\
+                        "indexer wrapper for Document object")
 
     def testCanonicalLinkForAT(self):
         wrapper = self.get_indexable_wrapper(self.my_doc)
         self.assertTrue(hasattr(wrapper, 'canonical_link'),
-            "'canonical_link' attribute not accessible with indexer wrapper for Document object")
-
-
-        
+                        "'canonical_link' attribute not accessible with "\
+                        "indexer wrapper for Document object")
+
+
 class TestDefaultCanonicalPathAdapter(TestCase):
 
@@ -99,9 +108,12 @@
         self.loginAsPortalOwner()
         self.purl = getToolByName(self.portal, 'portal_url')
-        self.my_doc = makeContent(self.portal, portal_type='Document', id='my_doc')
+        self.my_doc = makeContent(self.portal, portal_type='Document',
+                                  id='my_doc')
         self.logout()
 
-        self.mydoc_cp = '/'+'/'.join(self.purl.getRelativeContentPath(self.my_doc))
-        self.portal_cp = '/'+'/'.join(self.purl.getRelativeContentPath(self.portal))
+        self.mydoc_cp = '/' + '/'.join(self.purl.getRelativeContentPath(
+                                            self.my_doc))
+        self.portal_cp = '/' + '/'.join(self.purl.getRelativeContentPath(
+                                            self.portal))
 
     def testRegistration4Portal(self):
@@ -114,5 +126,4 @@
         self.assertFalse(cpadapter is None,
             "Can't get canonical path adapter for the Document object")
-        
 
     def testGetDefault4Portal(self):
@@ -120,13 +131,11 @@
         self.assertTrue(cpadapter.canonical_path == self.portal_cp,
             "Canonical path adapter return '%s' for portal, must be: '%s'" % (
-            cpadapter.canonical_path, self.portal_cp) )
-
+            cpadapter.canonical_path, self.portal_cp))
 
     def testGetDefault4AT(self):
         cpadapter = queryAdapter(self.my_doc, ICanonicalPath)
         self.assertTrue(cpadapter.canonical_path == self.mydoc_cp,
-            "Canonical path adapter return '%s' for document, must be: '%s'" % (
-            cpadapter.canonical_path, self.mydoc_cp) )
-
+            "Canonical path adapter return '%s' for document, "\
+            "must be: '%s'" % (cpadapter.canonical_path, self.mydoc_cp))
 
     def testSet4Portal(self):
@@ -138,10 +147,9 @@
         self.assertTrue(prop == newcp,
             "Canonical path adapter setter NOT SET new '%s' value to '%s' " \
-            "propery for the portal" % (newcp, PROPERTY_PATH) )
+            "propery for the portal" % (newcp, PROPERTY_PATH))
 
         self.assertTrue(cpadapter.canonical_path == newcp,
             "Canonical path adapter GET '%s' canonical_path, for portal, " \
-            "must be: '%s'" % (cpadapter.canonical_path, newcp) )
-
+            "must be: '%s'" % (cpadapter.canonical_path, newcp))
 
     def testSet4AT(self):
@@ -153,14 +161,13 @@
         self.assertTrue(prop == newcp,
             "Canonical path adapter setter NOT SET new '%s' value to '%s' " \
-            "propery for the Document" % (newcp, PROPERTY_PATH) )
+            "propery for the Document" % (newcp, PROPERTY_PATH))
 
         self.assertTrue(cpadapter.canonical_path == newcp,
             "Canonical path adapter GET '%s' canonical_path, for Document, " \
-            "must be: '%s'" % (cpadapter.canonical_path, newcp) )
-
+            "must be: '%s'" % (cpadapter.canonical_path, newcp))
 
     def testValidationWrong(self):
         cpadapter = queryAdapter(self.my_doc, ICanonicalPath)
-        for wrong in ['new\nline','s p a c e','with\ttabs']:
+        for wrong in ['new\nline', 's p a c e', 'with\ttabs']:
             try:
                 cpadapter.canonical_path = wrong
@@ -170,10 +177,9 @@
                 raise self.failureException, "InvalidValue not raised when " \
                       "'%s' wrong value try to set" % wrong
-        
+
     def testValidationGood(self):
         cpadapter = queryAdapter(self.my_doc, ICanonicalPath)
-        for good in ['./good','../good','/good', 'good']:
+        for good in ['./good', '../good', '/good', 'good']:
             cpadapter.canonical_path = good
-
 
     def testDeleteProperty(self):
@@ -187,5 +193,4 @@
             "Not deleted Canonical path customization property for the portal")
 
-
     def testDelCustomization(self):
         cpadapter = queryAdapter(self.portal, ICanonicalPath)
@@ -204,5 +209,6 @@
         self.loginAsPortalOwner()
         self.purl = getToolByName(self.portal, 'portal_url')
-        self.my_doc = makeContent(self.portal, portal_type='Document', id='my_doc')
+        self.my_doc = makeContent(self.portal, portal_type='Document',
+                                  id='my_doc')
         self.logout()
 
@@ -218,5 +224,4 @@
         self.assertFalse(cladapter is None,
             "Can't get canonical link adapter for the Document object")
-        
 
     def testGetDefault4Portal(self):
@@ -224,13 +229,11 @@
         self.assertTrue(cladapter.canonical_link == self.purl(),
             "Canonical link adapter return '%s' for portal, must be: '%s'" % (
-            cladapter.canonical_link, self.purl()) )
-
+            cladapter.canonical_link, self.purl()))
 
     def testGetDefault4AT(self):
         cladapter = queryAdapter(self.my_doc, ICanonicalLink)
         self.assertTrue(cladapter.canonical_link == self.mydoc_cl,
-            "Canonical link adapter return '%s' for document, must be: '%s'" % (
-            cladapter.canonical_link, self.mydoc_cl) )
-
+            "Canonical link adapter return '%s' for document, "\
+            "must be: '%s'" % (cladapter.canonical_link, self.mydoc_cl))
 
     def testSet4Portal(self):
@@ -242,10 +245,9 @@
         self.assertTrue(prop == newcl,
             "Canonical link adapter setter NOT SET new '%s' value to '%s' " \
-            "propery for the portal" % (newcl, PROPERTY_LINK) )
+            "propery for the portal" % (newcl, PROPERTY_LINK))
 
         self.assertTrue(cladapter.canonical_link == newcl,
             "Canonical link adapter GET '%s' canonical_link, for portal, " \
-            "must be: '%s'" % (cladapter.canonical_link, newcl) )
-
+            "must be: '%s'" % (cladapter.canonical_link, newcl))
 
     def testSet4AT(self):
@@ -257,13 +259,13 @@
         self.assertTrue(prop == newcl,
             "Canonical link adapter setter NOT SET new '%s' value to '%s' " \
-            "propery for the Document" % (newcl, PROPERTY_LINK) )
+            "propery for the Document" % (newcl, PROPERTY_LINK))
 
         self.assertTrue(cladapter.canonical_link == newcl,
             "Canonical link adapter GET '%s' canonical_link, for Document, " \
-            "must be: '%s'" % (cladapter.canonical_link, newcl) )
+            "must be: '%s'" % (cladapter.canonical_link, newcl))
 
     def testValidationWrong(self):
         cladapter = queryAdapter(self.my_doc, ICanonicalLink)
-        for wrong in ['http://new\nline','s p a c e','with\ttabs']:
+        for wrong in ['http://new\nline', 's p a c e', 'with\ttabs']:
             try:
                 cladapter.canonical_link = wrong
@@ -273,10 +275,9 @@
                 raise self.failureException, "InvalidValue not raised when " \
                     "'%s' wrong value try to set" % wrong
-        
+
     def testValidationGood(self):
         cladapter = queryAdapter(self.my_doc, ICanonicalLink)
-        for good in ['http://', './good','../good','/good', 'good']:
+        for good in ['http://', './good', '../good', '/good', 'good']:
             cladapter.canonical_link = good
-
 
     def testDeleteProperty(self):
@@ -290,5 +291,4 @@
             "Not deleted Canonical link customization property for the portal")
 
-
     def test_DelCustomization(self):
         cladapter = queryAdapter(self.portal, ICanonicalLink)
@@ -304,10 +304,14 @@
 ## Dummy object for converter tests
 ##
+
+
 class PortalURL:
     def __call__(self):
         return "http://nohost/plone"
+
     def getRelativeContentPath(self, context):
         return ("plone", context.getId())
 
+
 class BaseItem:
     portal_url = PortalURL()
@@ -320,11 +324,14 @@
 
     def absolute_url(self):
-        return self.portal_url() + '/'+ self.getId()
+        return self.portal_url() + '/' + self.getId()
+
 
 class GoodItem(BaseItem, PropertyManager, Traversable):
     """Property provider."""
 
+
 class NotPropertyProviderItem(BaseItem, Traversable):
     """Not property provider."""
+
 
 class NotAdaptableItem(BaseItem):
@@ -349,5 +356,5 @@
         # 2. canonical path propery mast be delete from the object
         self.assertEqual(item.hasProperty(ICanonicalPath(item).prop), False,
-                         "canonical path' property not deleted from the object")
+                         "canonical path property not deleted from the object")
 
     def test_convertPPathToLink(self):
@@ -368,5 +375,6 @@
         self.convertor.convertIPathToLink(bad)
         result = self.convertor.getLogs()
-        expect = "NotPropertyProviderItem instance has no attribute 'hasProperty'"
+        expect = "NotPropertyProviderItem instance "\
+                 "has no attribute 'hasProperty'"
         self.assertEqual(expect in result, True, "Wrong log: %s" % result)
 
@@ -397,6 +405,7 @@
         logs3 = self.convertor.getLogs()
         self.assertEqual(logs3 > logs2, True,
-             "Log was not updated - last: \"%s\", previous: \"%s\"" % (logs3, logs2))
-        
+             "Log was not updated - last: \"%s\", previous: \"%s\"" % (logs3,
+                                                                       logs2))
+
     def test_loggingCleanup(self):
         bad = NotPropertyProviderItem("item")
@@ -417,11 +426,14 @@
 
     def test_PropertyManagerAndTraversable(self):
-        class ProperyAndTraverseProvider(BaseItem, PropertyManager, Traversable):
+        class ProperyAndTraverseProvider(BaseItem, PropertyManager,
+                                         Traversable):
             """Property and Traversable provider."""
         item = ProperyAndTraverseProvider("test")
         self.assertNotEqual(queryAdapter(item, ICanonicalLink), None,
-           self.cant % ICanonicalLink.__name__ + "IPropertyManager and ITraversable.")
+            self.cant % ICanonicalLink.__name__ + "IPropertyManager and "\
+                                                  "ITraversable.")
         self.assertNotEqual(queryAdapter(item, ICanonicalPath), None,
-           self.cant % ICanonicalPath.__name__ + "IPropertyManager and ITraversable.")
+            self.cant % ICanonicalPath.__name__ + "IPropertyManager and "\
+                                                  "ITraversable.")
 
     def test_Traversable(self):
@@ -452,7 +464,9 @@
         item = NotProvider("test")
         self.assertEqual(queryAdapter(item, ICanonicalLink), None,
-           self.doget % ICanonicalLink.__name__ + "nor ITraversabe not IPropertyManager.")
+           self.doget % ICanonicalLink.__name__ + "nor ITraversabe not "\
+                                                  "IPropertyManager.")
         self.assertEqual(queryAdapter(item, ICanonicalPath), None,
-           self.doget % ICanonicalPath.__name__ + "nor ITraversabe not IPropertyManager.")
+           self.doget % ICanonicalPath.__name__ + "nor ITraversabe not "\
+                                                  "IPropertyManager.")
 
 
Index: /quintagroup.canonicalpath/trunk/quintagroup/canonicalpath/upgrades.py
===================================================================
--- /quintagroup.canonicalpath/trunk/quintagroup/canonicalpath/upgrades.py	(revision 3144)
+++ /quintagroup.canonicalpath/trunk/quintagroup/canonicalpath/upgrades.py	(revision 3145)
@@ -12,4 +12,5 @@
 from quintagroup.canonicalpath.adapters import PROPERTY_PATH
 from quintagroup.canonicalpath.adapters import DefaultPropertyAdapter
+
 
 class CanonicalConvertor(object):
@@ -65,5 +66,6 @@
            Log results in logger.
         """
-        src_msg = type(src_iface) in StringTypes and src_iface or src_iface.__name__
+        src_msg = type(src_iface) in StringTypes and src_iface \
+                                                 or src_iface.__name__
         msg = "Migrate %s into %s for %s object: " \
                % (src_msg, dst_iface.__name__, obj.absolute_url())
@@ -84,10 +86,10 @@
             msg += "SUCCESS"
         self._logger.log(lev, msg)
-            
+
         return lev == INFO and True or False
-    
+
     def _getOrMakeAdapter(self, obj, arg):
         """Function return adapter for process of the property.
-           Adapter get by interface (if arg is not a string - interface assumed)
+           Adapter get by interface(if arg is not a string - interface assumed)
            OR if arg is string - adapter created from DefaultCanonicalAdapter.
         """
@@ -120,3 +122,2 @@
         self._logger = Logger("quintagroup.canonicalpath", NOTSET)
         self._logger.addHandler(handler)
-
Index: /quintagroup.canonicalpath/trunk/setup.py
===================================================================
--- /quintagroup.canonicalpath/trunk/setup.py	(revision 3144)
+++ /quintagroup.canonicalpath/trunk/setup.py	(revision 3145)
@@ -4,5 +4,5 @@
 version = '0.7'
 
-tests_require=['zope.testing']
+tests_require = ['zope.testing']
 setup(name='quintagroup.canonicalpath',
       version=version,
@@ -10,5 +10,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=[
         "Programming Language :: Python",
@@ -29,5 +28,5 @@
       tests_require=tests_require,
       extras_require=dict(tests=tests_require),
-      test_suite = 'quintagroup.canonicalpath.tests.test_suite',
+      test_suite='quintagroup.canonicalpath.tests.test_suite',
       entry_points="""
       # -*- Entry points: -*-
@@ -36,3 +35,2 @@
       """,
       )
- 
