Skip to content
Browse files

pep8

Also, let Travis run the tests.
  • Loading branch information...
1 parent 05f39fc commit 97f428a89650b2ea758d9cfbff63225ad7a340e8 @mauritsvanrees mauritsvanrees committed Dec 27, 2012
View
3 Products/feedfeeder/__init__.py
@@ -16,8 +16,7 @@
from Products.feedfeeder.config import DEFAULT_ADD_CONTENT_PERMISSION
DirectoryView.registerDirectory('skins', product_globals)
-DirectoryView.registerDirectory('skins/feedfeeder',
- product_globals)
+DirectoryView.registerDirectory('skins/feedfeeder', product_globals)
_ = MessageFactory('feedfeeder')
View
2 Products/feedfeeder/browser/feed.py
@@ -91,7 +91,7 @@ def items(self):
enclosures = x.getObjectids
if (enclosures and enclosures is not None and
- len(enclosures) == 1):
+ len(enclosures) == 1):
# only one enclosure? return item title but return link
# to sole enclosure, unless there is some body text.
if not int(x.getHasBody):
View
6 Products/feedfeeder/content/item.py
@@ -3,7 +3,10 @@
from DateTime import DateTime
from Products.ATContentTypes.content.document import ATDocument
from Products.ATContentTypes.content.folder import ATFolder
-from Products.Archetypes.atapi import *
+from Products.Archetypes.atapi import (
+ CalendarWidget, ComputedField, ComputedWidget, DateTimeField,
+ ObjectField, Schema, StringField, StringWidget, registerType)
+
from Products.CMFCore.utils import getToolByName
from Products.CMFPlone.utils import base_hasattr
from zope import interface
@@ -91,7 +94,6 @@ class FeedFeederItem(ATFolder):
schema = FeedFeederItem_schema
-
security.declarePublic('addEnclosure')
def addEnclosure(self, id):
View
4 Products/feedfeeder/contenthandler.py
@@ -7,7 +7,7 @@
try:
from zope.annotation.interfaces import IAttributeAnnotatable
from zope.annotation.interfaces import IAnnotations
- IAttributeAnnotatable, IAnnotations # pyflakes
+ IAttributeAnnotatable, IAnnotations # pyflakes
except ImportError:
from zope.app.annotation.interfaces import IAttributeAnnotatable
from zope.app.annotation.interfaces import IAnnotations
@@ -46,7 +46,7 @@ def apply(self, contentNode):
if not IAttributeAnnotatable.providedBy(self.context):
directly = interface.directlyProvidedBy(self.context)
interface.directlyProvides(self.context,
- directly + IAttributeAnnotatable)
+ directly + IAttributeAnnotatable)
annotations = IAnnotations(self.context)
metadata = annotations.get(self.ANNO_KEY, None)
if metadata is None:
View
2 Products/feedfeeder/doc/__init__.py
@@ -1 +1 @@
-#
+#
View
19 Products/feedfeeder/extendeddatetime.py
@@ -1,14 +1,15 @@
from DateTime import DateTime
#http://www.timeanddate.com/library/abbreviations/timezones/na/
-alttzmap= dict( ndt=u'GMT-0230',
- adt=u'GMT-0300',
- edt=u'GMT-0400',
- cdt=u'GMT-0500',
- mdt=u'GMT-0600',
- pdt=u'GMT-0700',
- akdt=u'GMT-0800',
- hadt=u'GMT-0900')
+alttzmap= dict(ndt=u'GMT-0230',
+ adt=u'GMT-0300',
+ edt=u'GMT-0400',
+ cdt=u'GMT-0500',
+ mdt=u'GMT-0600',
+ pdt=u'GMT-0700',
+ akdt=u'GMT-0800',
+ hadt=u'GMT-0900')
+
def extendedDateTime(dt):
"""takes a very pragmatic approach to the timezone variants in feeds"""
@@ -22,5 +23,3 @@ def extendedDateTime(dt):
frags[-1] = newtz
newdt = ' '.join(frags)
return DateTime(newdt)
-
-
View
4 Products/feedfeeder/tests/test_fields.py
@@ -9,16 +9,14 @@ def afterSetUp(self):
feedfolder_id = self.folder.invokeFactory('FeedfeederFolder', 'feedfolder')
self.feedfolder = getattr(self.folder, feedfolder_id)
-# self.feedfolder.invokeFactor
def test_redirect_field(self):
""" Does exists the redirect field? """
self.assertTrue(getattr(self.feedfolder, 'getRedirect'))
+
def test_suite():
from unittest import TestSuite, makeSuite
suite = TestSuite()
suite.addTest(makeSuite(TestFields))
return suite
-
-

0 comments on commit 97f428a

Please sign in to comment.
Something went wrong with that request. Please try again.