Use zope.interface decorator

This not only makes code more pleasent to read,
but also makes the code python 3 compatible
(while maintaining python 2 compatibility).
This commit is contained in:
Gil Forcada
2016-07-08 23:17:03 +02:00
parent 3619419df4
commit d5e7afcd23
8 changed files with 19 additions and 25 deletions
+2 -3
View File
@@ -35,7 +35,7 @@ from zope.component.factory import Factory
from zope.event import notify
from zope.i18n import translate
from zope.i18nmessageid import Message
from zope.interface import implements
from zope.interface import implementer
import logging
@@ -65,6 +65,7 @@ MAIL_NOTIFICATION_MESSAGE_MODERATOR = _(
logger = logging.getLogger('plone.app.discussion')
@implementer(IComment)
class Comment(CatalogAware, WorkflowAware, DynamicType, Traversable,
RoleManager, Owned, Implicit, Persistent):
"""A comment.
@@ -73,8 +74,6 @@ class Comment(CatalogAware, WorkflowAware, DynamicType, Traversable,
number of standard methods instead of subclassing, to have total control
over what goes into the object.
"""
implements(IComment)
security = ClassSecurityInfo()
meta_type = portal_type = 'Discussion Item'