Skip to content

Commit

Permalink
Replace implements with implementer decorator
Browse files Browse the repository at this point in the history
  • Loading branch information
kylemacfarlane committed Oct 11, 2014
1 parent 2da115b commit da21392
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/z3c/rml/directive.py
Expand Up @@ -39,8 +39,8 @@ def getFileInfo(directive, element=None):
element = directive.element
return '(file %s, line %i)' %(root.filename, element.sourceline)

@zope.interface.implementer(interfaces.IRMLDirective)
class RMLDirective(object):
zope.interface.implements(interfaces.IRMLDirective)
signature = None
factories = {}

Expand Down
6 changes: 3 additions & 3 deletions src/z3c/rml/document.py
Expand Up @@ -617,11 +617,11 @@ class IDocument(interfaces.IRMLDirectiveSignature):
u'the exact contents.'),
required=False)

@zope.interface.implementer(interfaces.IManager,
interfaces.IPostProcessorManager,
interfaces.ICanvasManager)
class Document(directive.RMLDirective):
signature = IDocument
zope.interface.implements(interfaces.IManager,
interfaces.IPostProcessorManager,
interfaces.ICanvasManager)

factories = {
'docinit': DocInit,
Expand Down
3 changes: 1 addition & 2 deletions src/z3c/rml/occurence.py
Expand Up @@ -75,9 +75,8 @@ def containing(*occurences):
f_locals['__interface_tagged_values__'] = {'directives': occurences}


@zope.interface.implementer(IOccurence)
class Occurence(object):
zope.interface.implements(IOccurence)

tag = fieldproperty.FieldProperty(IOccurence['tag'])
signature = fieldproperty.FieldProperty(IOccurence['signature'])
condition = fieldproperty.FieldProperty(IOccurence['condition'])
Expand Down
2 changes: 1 addition & 1 deletion src/z3c/rml/template.py
Expand Up @@ -131,8 +131,8 @@ def process(self):
class IPageGraphics(canvas.IDrawing):
"""Define the page graphics for the page template."""

@zope.interface.implementer(interfaces.ICanvasManager)
class PageGraphics(directive.RMLDirective):
zope.interface.implements(interfaces.ICanvasManager)
signature = IPageGraphics

def process(self):
Expand Down

0 comments on commit da21392

Please sign in to comment.