some code-analysis reclamations fixed.

code-analysis OK up to: T100, S100, S101, C815, C812
This commit is contained in:
Katja Süss
2017-07-29 11:35:15 +02:00
parent 100690ccdf
commit b08852baa0
5 changed files with 8 additions and 12 deletions
@@ -47,7 +47,7 @@ comment form with the "website" field::
from zope import schema
from zope.annotation import factory
from zope.component import adapts
from zope.component import adapter
from zope.interface import Interface
from zope.publisher.interfaces.browser import IDefaultBrowserLayer
@@ -61,9 +61,9 @@ comment form with the "website" field::
website = schema.TextLine(title=u"Website", required=False)
# Persistent class that implements the ICommentExtenderFields interface
@adapter(Comment)
class CommentExtenderFields(Persistent):
interface.implements(ICommentExtenderFields)
adapts(Comment)
website = u""
# CommentExtenderFields factory
@@ -71,9 +71,8 @@ comment form with the "website" field::
# Extending the comment form with the fields defined in the
# ICommentExtenderFields interface.
@adapter(Interface, IDefaultBrowserLayer, CommentForm)
class CommentExtender(extensible.FormExtender):
adapts(Interface, IDefaultBrowserLayer, CommentForm)
fields = Fields(ICommentExtenderFields)
def __init__(self, context, request, form):