##// END OF EJS Templates
Finished a rough draft of the exporters.
Finished a rough draft of the exporters.

File last commit:

r10485:1de3574b
r10588:82237cdb
Show More
activatable.py
19 lines | 585 B | text/x-python | PythonLexer
Jonathan Frederic
Post code-review, extended refactor.
r10485 from transformers.base import ConfigurableTransformers
Jonathan Frederic
Split transformer code
r10437 class ActivatableTransformer(ConfigurableTransformers):
"""A simple ConfigurableTransformers that have an enabled flag
Inherit from that if you just want to have a transformer which is
no-op by default but can be activated in profiles with
c.YourTransformerName.enabled = True
"""
enabled = Bool(False, config=True)
def __call__(self, nb, other):
if not self.enabled :
return nb, other
else :
return super(ActivatableTransformer, self).__call__(nb, other)