From 658fad42b04420962e6ac478247411ee77483d93 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Wed, 25 Apr 2012 22:08:22 -0400 Subject: General code cleanup. - Add explicit dependency on zope.event in setup.py. - Use Python 3 compatible syntax for specifying that a class implements an interface, i.e. the @implementer class decorator. - print_function futures. - Whitespace normalization. --- src/mailman/chains/moderation.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/mailman/chains/moderation.py') diff --git a/src/mailman/chains/moderation.py b/src/mailman/chains/moderation.py index 9f9633346..6c2ed1180 100644 --- a/src/mailman/chains/moderation.py +++ b/src/mailman/chains/moderation.py @@ -34,7 +34,7 @@ made as to the disposition of the message. `defer` is the default for members, while `hold` is the default for nonmembers. """ -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, print_function, unicode_literals __metaclass__ = type __all__ = [ @@ -42,7 +42,7 @@ __all__ = [ ] -from zope.interface import implements +from zope.interface import implementer from mailman.chains.base import Link from mailman.config import config @@ -52,15 +52,13 @@ from mailman.interfaces.chain import IChain, LinkAction +@implementer(IChain) class ModerationChain: """Dynamically produce a link jumping to the appropriate terminal chain. The terminal chain will be one of the Accept, Hold, Discard, or Reject chains, based on the member's or nonmember's moderation action setting. """ - - implements(IChain) - name = 'moderation' description = _('Moderation chain') -- cgit v1.2.3-70-g09d2